Built-in type: The type that is written in the. NET Framework System namespace.
Let's see what the built-in types are in C #
The built-in types above, except string and object, are all referred to as simple types. You can also think of the left as a C # type of keyword, the left is the type of aliases, keywords and aliases can be interchangeable.
The effect is the same as int i=1 and System.Int32 i=1.
Maybe you're skeptical about the above, but. NET gives us a way to get the actual type of C # type GetType () method, such as int i;,i.gettype (); The result will be system.int32. As long as the types listed in the table above are used, the results obtained using the GetType () method are the same as the right. Here's a look at the custom type.
Code class test{ staticvoid Main (string[] args) {person p=new person; Console.WriteLine (P.gettype ()); Console.readkey (); }} class person{}
The result of the output is person. The GetType () method returns the namespace. class name if there is no namespace, then the class name is returned.
Thank you, we're here today. We study together
C # built-in type