本文整理汇总了C#中System.Int32.GetTypeCode方法的典型用法代码示例。如果您正苦于以下问题:C# Int32.GetTypeCode方法的具体用法?C# Int32.GetTypeCode怎么用?C# Int32.GetTypeCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Int32
的用法示例。
在下文中一共展示了Int32.GetTypeCode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Print
public void Print()
{
System.Int32 i = new System.Int32();
i = 23;
Console.WriteLine(i.GetHashCode());
Console.WriteLine(i.GetType());
Console.WriteLine(i.GetTypeCode());
Console.WriteLine(i.ToString());
if (i.CompareTo(20) < 0)
Console.WriteLine("{0} < 20", i);
else if (i.CompareTo(20) == 0)
Console.WriteLine("i equals 20");
else
Console.WriteLine("i > 20");
Console.WriteLine(System.Int32.MinValue);
Console.WriteLine(System.Int32.MaxValue);
Console.WriteLine(System.Double.Epsilon);
Console.WriteLine(System.Double.PositiveInfinity);
Console.WriteLine(System.Double.NegativeInfinity);
Console.WriteLine(System.Boolean.FalseString);
Console.WriteLine(System.Boolean.TrueString);
Console.WriteLine(System.Char.IsDigit('1'));
Console.WriteLine(System.Char.IsLetter('9'));
Console.WriteLine(System.Char.IsWhiteSpace("naynish chaughule", 7));
Console.WriteLine(System.Char.IsPunctuation('?'));
//parsing
double d = System.Double.Parse("90.35");
Console.WriteLine(d);
System.Int64 longVar = Convert.ToInt64("43654703826562");
Console.WriteLine(longVar);
Console.WriteLine(System.Guid.NewGuid());
System.DateTime dt = new DateTime(2012, 6, 04);
Console.WriteLine(dt.ToLongDateString());
Console.WriteLine(DateTime.Now.ToLongTimeString());
Console.WriteLine(dt.DayOfWeek);
Console.WriteLine(dt.AddMonths(5).ToLongDateString());
Console.WriteLine("{0} {1} {2}", dt.Date, dt.DayOfYear, dt.IsDaylightSavingTime());
TimeSpan ts = new TimeSpan(24, 30, 30);
Console.WriteLine(dt.Add(ts).ToLongDateString());
Console.WriteLine(ts.Subtract(new TimeSpan(2,30, 45)));
NumericsDemo();
WorkingWithStrings();
}