Linked Questions
88 questions linked to/from When should I use a struct rather than a class in C#?
15 votes
8 answers
6k views
When structures are better than classes? [duplicate]
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?" - ...
6 votes
5 answers
5k views
Should I use a structure instead of a class to hold string only data in C#? [duplicate]
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 ...
4 votes
7 answers
619 views
Should I use a Struct? [duplicate]
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 ...
1 vote
2 answers
3k views
Modify struct variable [duplicate]
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....
4 votes
5 answers
505 views
.NET Choosing between Structures and Classes [duplicate]
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 ...
2 votes
3 answers
631 views
When to use Structs in C# [duplicate]
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 ...
1 vote
3 answers
968 views
In WPF, in a project use Struct or Class for model with MVVM pattern? [duplicate]
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.
0 votes
3 answers
479 views
Structs and Classes / value type vs refrence type [duplicate]
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 ...
0 votes
1 answer
804 views
when and why do we use struct in C# [duplicate]
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?
2 votes
0 answers
556 views
When should Structs be used in C#? [duplicate]
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 ...
0 votes
1 answer
213 views
In C#, when should I use a struct and when should I use a class? [duplicate]
Possible Duplicate: When to use struct in C#? And conversely, when shouldn't I use either?
2 votes
1 answer
306 views
Why POCO objects are created using classes instead of structs [duplicate]
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 ...
0 votes
1 answer
103 views
C# Type Safety. When is too much? [duplicate]
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....
0 votes
1 answer
126 views
class and structure [duplicate]
Possible Duplicate: When to use struct in C#? Why should we use class instead of structure
1 vote
2 answers
67 views
Should this stll be a struct or better a class(9 value type properties and 1 reference value) [duplicate]
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 ...