开发者

when and why do we use struct in C# [duplicate]

开发者 https://www.devze.com 2023-02-18 20:55 出处:网络
This question already has answers here: 开发者_如何学编程 Closed 11 years ago. Possible Duplicates:
This question already has answers here: 开发者_如何学编程 Closed 11 years ago.

Possible Duplicates:

When to use struct in C#?

When should I use a struct instead of a class?

When and why do we use struct in C#? Is it just to save memory allocation?


I would say check out this page... http://www.jaggersoft.com/pubs/StructsVsClasses.htm There are many differences, but in many ways they are the same. I wouldnt say they are cheaper... just a bit different.

0

精彩评论

暂无评论...
验证码 换一张
取 消