What are the types of custom values ​​in C # and how to create them?

What are the types of custom values ​​in C #? How can I create them?

+4
source share
1 answer

To create a value type, you need to define your type as a struct (as opposed to a class that defines a reference type). For instance:

 struct MyValueType { public string MyField; } 
+11
source

Source: https://habr.com/ru/post/1446706/


All Articles