Question
In .NET (C#), what is the difference between 'struct'
and 'class'?Solution
In C#, struct is a value type. Copying a struct creates an independent copy (passed by value). class is a reference type. Variables hold references to heap-allocated objects (passed by reference). Structs are suitable for small, simple data (coordinates, RGB color) where value semantics are desired. Classes are used for complex objects with identity. Structs cannot be null (unless Nullable
Cinnabar is an ore of which metal?
Which gas is the chief component of Bio-gas?
Which of the following is used in alcoholic drinks?
Whose experiments supports Abiotic synthesis?
Which of the following pollutants is the major contributor to photochemical smog?
Which of the following fatty acids does NOT form soap?
Which of the following is the richest source of phosphorus?
"Schist" is the example of which type of rock?
Which element is known as the 'King of Chemicals.
_____________ has the maximum attraction force between the molecules.