Tag: Dex DMI NEW * * Time () time date format character index
++++string class +++++
Small Black wrench-Properties
Purple Cube-Method
String. Length-string lengths, return int type
String. TrimStart ()-Remove the front space
String. TrimEnd ()-Remove space after
String. Trim ()-Remove the trailing space string
String. ToUpper ()-Converts lowercase characters in a string into uppercase string
String. ToLower ()-Becomes a lowercase string
Index/subscript
String. SubString (a); -Intercept the string, a-the subscript to begin intercepting, including the characters corresponding to the subscript
String. SubString (A, b); -A-subscript, B-to intercept several characters (starting from 1)
String
Attention:????
String. IndexOf ("string"); -Returns the index of the first occurrence in a string if no match is returned-1 int
int B = S.indexof ("Day", S.indexof ("Day") +1); Get a second match, 3 4 5 6
String. LastIndexOf ("string"); -Returns the index of the last occurrence
String. Startwidth ("string"); -Determine whether to start with what
String. Endswidth ("string"); -Determine whether to end with what
String. Contains ("string"); -Determine if a string is included
S.replace (the string to replace, the replacement string); -Character substitution string
S.remove (3); -Remove all characters from index to end of string
+++++math class +++++
Math.pow (x, y); -Second party
MATH.SQRT (x); -square root
Math.ceiling (double); -Take the upper limit
Math.floor (double); -Lower Limit
Math.Round (double); -Rounding
Math.Abs (double); -Take absolute value
+++++datetime class +++++
DateTime Variable name = new DateTime (); -Definition
DateTime.Now; -Get the current time of this PC
. ToString ("Format"); -Set date formatting,
yyyy-mm-month dd-day hh-12 hour HH-24 system hours mm-minutes ss-seconds ms-milliseconds
. AddYears (); -How many years are added on this time basis
. AddMonths (); -Increase Month
. AddDays (); -Increase Day
. AddHours (); -Increase hours
. AddMinutes (); -Add minutes
. AddSeconds (); -Add seconds
. year; -Gets the year of this time variable
. Month; -Get Month
. Day; -Day
. Hour; -Hour
. Minute; -Minute
. Second; -Seconds
. millisecond; -Milliseconds
. DayOfYear; -Gets the current date is the day ordinal of the year
. DayOfWeek; -Get the day of the week
. TimeOfDay; -Get Time section
. Date; -Get Date part
TimeSpan type-time interval type
. Days-the difference in how many day
. Hours-How many hours the gap is in a day
. Minutes-How many minutes the gap in a day
. Seconds-How many seconds difference in a day
. Milliseconds-MS
. Total .... Cumulative gap
String.Split ()
C # language classes