IT Questions and Answers :)

Friday, June 21, 2019

In .NET, which of the following is NOT a value type?

In .NET, which of the following is NOT a value type?

  • double
  • char
  • int
  • string

In .NET, which of the following is NOT a value type?

EXPLANATION

Main features of value types

A variable of a value type contains a value of the type. For example, a variable of the int type might contain the value 42. This differs from a variable of a reference type, which contains a reference to an instance of the type, also known as an object.
When you assign a new value to a variable of a value type, that value is copied. When you assign a new value to a variable of a reference type, the reference is copied, not the object itself.

Source

https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/value-types

 

 
Share:

0 comments:

Post a Comment

Popular Posts