string [] strs = new string [3 ];
int [] arr = new int [3 ];
strs[0 ] == null
arr[0 ]
strs = {"a" , "b" , "c" };
string [] strs = new string [3 ]{"a" , "b" , "c" };
string [] strs = new string []{"a" , "b" , "c" };
string [] strs = {"a" , "b" , "c" };
string [] temp = strs;
temp[0 ] = "temp" ;
strs[0 ]
string类型
Console.WriteLine("{0} is {1} {2}." , "this" , "a" , "test" );
Console.WriteLine("{2} is {1} {1}." , "this" , "a" , "test" );
"" == string .empty;
string .IsNullOrEmpty(string .empty);
string .IsNullOrEmpty(null );
DateTime类型
DateTime dt = DateTime.Now;
dt.Year
dt.Month
dt.Day
dt.Hour
dt.Minute
dt.Second
dt.Millisecond
DateTime dt = new DateTime(2018 , 7 , 7 , 7 , 7 , 7 , 7 );
dt.ToString();
dt.ToLongDateString()
dt.ToShortDateString()
dt.ToLongTimeString()
dt.ToShortTimeString()
dt.ToString("yyyy-MM-dd HH:mm:ss" );
dt.ToString("y-M-d h:m:s" );
dt.ToString("Y-D-S s/d/y" );