then wht about enum and struct i'm confused???
Arrays & Enum
Sir, my question is if Array is a collection of similar data type?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Oct 28, 2013, 7:01 AM
The type of these constants is int by default unless you specify a different integer type such as byte or long when declaring the enum.
A variable of an enum type can only be set to one enum constant at a time unless the enum is decorated with the Flags attribute which enables values to be combined.
A struct is similar to a class except that:
1. It usually represents a type with a small memory footprint (no more than 16 bytes) so that it can be copied without affecting performance. The basic types such as int, long, byte, double, float, decimal, bool and char are all C# aliases for structs defined in the .NET framework.
2. Structs are value types. This means that a variable of a struct type holds an instance of the struct itself not a reference to it as would be the case with classes which are reference types.