(a) Math class: Math1. Math.ceiling (Fractional/integer): Returns the smallest integer greater than the current decimal2. Math.floor (Fractional/integer): Returns the largest integer less than the current decimal Console.WriteLine (math.ceiling (3.14));//4Console.WriteLine (Math.floor (3.14));//3Console.WriteLine (Math.ceiling (3.0));//3 3. Math.pow (2,3) to evaluate the index. Equivalent to 2 of the 3-time Square4. MATH.SQRT ( -) Open Square. 5. Rounding. Math.Round (3.63);//4Math.Round (3.14);//3(ii) Date Time: datetime construct: DateTime DT=Newdatetime (); Current time: DateTime DT=DateTime.Now; Date Time Object data: year,month,day,hour,minite,second,milliseconddayofweek--day of the week. dayofyear--the first day of the year. date--Date part of the collection period. timeofday--time period part. Functions of DateTime objects: AddYears (intnum) AddMonths (intnum) AddDays (intnum) AddHours (intnum) AddMinutes (intnum) AddSeconds (intnum) datetime data can be subtracted directly, returning the number of days and times between two dates. (c) String*Length: The lengths of the strings. ToLower (): All turns into lowercase toupper (): All turns into uppercase TrimStart (): TrimEnd (): Trim (): A space at the ends of the press. *indexof ("Sub-string"):(intreturns the position of the substring in the first occurrence of the string. *lastindexof ("Sub-string"):(intreturns the last occurrence of a substring in a string. The above two functions, if the corresponding substring is not found in the string, returns-1*substring (intstart[,intLength]): (string) to intercept the substring. Replace (stringOldstring New):(stringThe old swop of the string into a new string
Common C # classes