Linked Questions

15 votes
8 answers
6k views

Duplicate of: When to use struct in C#? Are there practical reasons to use structures instead of some classes in Microsoft .NET 2.0/3.5 ? "What is the difference between structures and classes?" - ...
coder's user avatar
  • 185
6 votes
5 answers
5k views

C# question. Say I have a customers class that has a bunch of props for storing string only data such as name postal data and phone numbers. I don't use this entity for ORM as I'm only adding it to ...
Anonymous Type's user avatar
4 votes
7 answers
619 views

Possible Duplicate: When to use struct in C#? Hi, I am creating an application that has a class in C# that is purely for holding variables, it does nothing else but set and get these variables. I ...
stuartmclark's user avatar
  • 1,253
1 vote
2 answers
3k views

Assume I have a struct Point with public int's x and y. I want to change a value and I can. But once I store it in a dictionary, I can no longer do so. Why? MWE: using System; using System....
Arthur Dent's user avatar
  • 1,962
4 votes
5 answers
505 views

Duplicate: When should I use a structure instead of a class? Just wondering if anyone can provide some advice or examples of when it is best to use a structure over a class in .NET or vice versa I ...
Sean Taylor's user avatar
  • 5,028
2 votes
3 answers
631 views

Possible Duplicate: When to use struct in C#? I'm reading a C# tutorial in the net http://www.csharp-station.com/Tutorials/Lesson12.aspx. And I came to the topic about Structs. I'm just confused ...
yonan2236's user avatar
  • 13.7k
1 vote
3 answers
968 views

I'm confused which type I use to create model in project, Struct or Class? There're about ten struct and some collections. I'm a newbie.
SubmarineX's user avatar
0 votes
3 answers
479 views

So I've been trying to get my head around this for weeks. I understand that structs are value types, and that classes are reference types. Where I get confused is the differences in behavior between ...
mevans's user avatar
  • 316
0 votes
1 answer
804 views

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?
user544079's user avatar
  • 16.7k
2 votes
0 answers
556 views

Possible Duplicates: When to use struct in C#? When should I use a struct instead of a class? What would be some instances when one would want to use Structs in C#? Is it when you want a ...
KingNestor's user avatar
  • 68.4k
0 votes
1 answer
213 views

Possible Duplicate: When to use struct in C#? And conversely, when shouldn't I use either?
Steve Dunn's user avatar
2 votes
1 answer
306 views

Why POCO objects are created using classes instead of structs in C#, while POCO is intended to carry only public attributes and not any behaviors? Do we really need to create a class with get and set ...
Jawahar's user avatar
  • 4,885
0 votes
1 answer
103 views

I am looking to design and create a new large-scale application from the ground up and use type safety with structs where appropriate. The application does have a large number of calls between classes....
Dech's user avatar
  • 1,722
0 votes
1 answer
126 views

Possible Duplicate: When to use struct in C#? Why should we use class instead of structure
hari's user avatar
  • 1
1 vote
2 answers
67 views

Imagine I have have a struct with 9 properties, which return a value type as its result and in that struct I also have a property which returns a reference type : IEnumerable like this: public ...
kkkk00999's user avatar
  • 179

15 30 50 per page
1
2 3 4 5 6