what's the difference between class and type in c#?

C# is a strongly typed language; therefore every variable and object must have a declared type.

 

A data type can be described as being either:

A built-in data type, such as an int or char, or

A user-defined data type, such as a class or interface.

Data types can also be defined as being either:

Value Types (C# Reference), which store values, or

Reference Types (C# Reference), which store references to the actual data.

 

 

Class is a user define data type.

posted on 2022-01-19 21:31  yyxu  阅读(34)  评论(0编辑  收藏  举报

导航