5-6 years ago when i was in school, I had C as my programming language. And at that time, I read about struct and little bit about Classes.
At that time I had a concept that under struct we cannot declare functions and other such things.
Structure only allows value types and themself are also value types. And I was living under that same old age concepts. 3 days earlier when I had some conversation with my collegues they proved that struct can also contain function definations, constuctors any many more things against my thinking of
public struct abc
{
int a;
long b;
.... //No function nothing else can come here. Only variables
};
But in .net I saw DateTime Struct and it had functions constructors and everything against my years old concepts.
Then what makes difference between classes and struct
if every thing can be done in struct.
I am sure there would be some big differences, due to which struct are still coming with .net rather than obsoleting it.
What are those differences.
And what other such concepts could a one have that changed everything.