Example of value type and refarnce type

Answers were Sorted based on User's Feedback



Example of value type and refarnce type..

Answer / saubhagya

Structures are value types and classes are reference types

Is This Answer Correct ?    19 Yes 1 No

Example of value type and refarnce type..

Answer / neerajtyagi

---Value Types (C# Reference)

The value types consist of two main categories:

Structs

Enumerations

Structs fall into these categories:

Numeric types

Integral types

Floating-point types

decimal

bool

User defined structs.


------Reference Types (C# Reference)

Variables of reference types, referred to as objects, store
references to the actual data. This section introduces the
following keywords used to declare reference types:

class

interface

delegate

This section also introduces the following built-in
reference types:

object

string

Is This Answer Correct ?    7 Yes 1 No

Example of value type and refarnce type..

Answer / kishore.a

Example for Value type is Structure.
Referenece type Class.

Is This Answer Correct ?    2 Yes 0 No

Example of value type and refarnce type..

Answer / git101288

class is the value type and struct is the refrence type
this the example for value type n refrence type

Is This Answer Correct ?    0 Yes 21 No

Post New Answer

More C Sharp Interview Questions

There are a class A. Another class B derived from it. Now if I do A a = new B(); and B b = new B(); What will happen in both the statements. And what is the difference between these two statements.

3 Answers   HCL,


What are the two kinds of properties?

10 Answers   Wipro,


Hi to everybody. Lastweek i had taken an interview on c#. They ask what is boxing & unboxing, Masking.Please tell the answer and it is useful for me.

8 Answers  


Is hashset serializable c#?

0 Answers  


How many constructors can a class have in c#?

0 Answers  


Explain about Serialize and MarshalByRef?

0 Answers  


What is the use of system.environment class in c#.net?

0 Answers  


What is form feed in c#?

0 Answers  


What is attribute c#?

0 Answers  


What method is used to sort the elements of the array in descending order?

0 Answers   Siebel,


One start and stop button is there and one textbox is there.when you click start button ,it will display 1,2,3......up to infinite in textbox.when you click stop button it will stop.

1 Answers  


What is predicate builder?

0 Answers  


Categories