Integer & struct are value types or reference types in .NET?

Answer Posted / guest

Integer and struct are value types in .net.Integer has
fixed range of values hence they are going to be stored in
the stack memory.so,what ever is stored in stack memeory is
a value type.struct is similar to a class(1.e, it contains
dataitems of different datatypes) but the only difference
is that struct is a value type ,class is a reference
type.struct is a value type because the values in struct
can be accesed with the help variable created for the
struct i.e,Dot operator appended to the struct variable can
be used to access each of the individual data items in the
struct class.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Tell us what is a variable of implicit type and what is its scope?

768


Which Namespace is used to to achieve MultiThreading in .NET?

779


Explain the purpose of Remoting in .NET?

842


What is the difference between boxing and unboxing?

726


What does msil do?

759


What is multiThreading in .NET?

785


Is there any inbuilt tool or command provided by .NET to view the code inside the assembly?

776


What is the use of design pattern?

742


Explain .NET architecture?

825


How many types of design patterns available in .NET?

763


Explain how to produce an assembly?

754


Explain about .Net products?

810


Can a try block have nested try blocks?

769


Tell us what is heap and what is stack?

772


Tell us what is a sealed class?

746