Interesting functions

Split up string

string[] temp = name.Split(new Char[] { '\\' });
split on enter: string[] temp = name.Split(new Char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);

.ToString(IFormatprovider) / .ToString(Format, IFormatprovider)

Imports System.Globalization
CultureInfo.InvariantCulture
New CultureInfo("en-us")
CultureInfo.CurrentCulture

DateTime:
d Format Specifier en-US Culture 10/1/2008
D Format Specifier en-US Culture Wednesday, October 01, 2008
f Format Specifier en-US Culture Wednesday, October 01, 2008 5:04 PM
F Format Specifier en-US Culture Wednesday, October 01, 2008 5:04:32 PM
g Format Specifier en-US Culture 10/1/2008 5:04 PM
G Format Specifier en-US Culture 10/1/2008 5:04:32 PM
m Format Specifier en-US Culture October 01
o Format Specifier en-US Culture 2008-10-01T17:04:32.0000000
r Format Specifier en-US Culture Wed, 01 Oct 2008 17:04:32 GMT
s Format Specifier en-US Culture 2008-10-01T17:04:32
t Format Specifier en-US Culture 5:04 PM
T Format Specifier en-US Culture 5:04:32 PM
u Format Specifier en-US Culture 2008-10-01 17:04:32Z
U Format Specifier en-US Culture Thursday, October 02, 2008 12:04:32 AM
Y Format Specifier en-US Culture October, 2008

Number:
16325.62901
G "eu-ES" Displays: 16325,62901
G "en-US" Displays: 16325.62901
C "en-US" Displays: $16,325.63
C "en-GB" Displays: 16,325.63
E04 "sv-SE" Displays: 1,6326E+004
E04 "en-NZ" Displays: 1.6326E+004
F "fr-FR" Displays: 16325,63
F "en-CA" Displays: 16325.63
N "es-ES" Displays: 16.325,63
N "fr-CA" Displays: 16 325,63
P CultureInfo.InvariantCulture Displays: 163.26 %
P "ar-EG" Displays: 163.256 %

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License