C#.NET Multiple choices


Total available count: 28
Subject - Microsoft Technologies
Subsubject - C#.NET

Which of the following notation is incorrect?


 

 

 

 



C


Solution:-

C# Object Notation

JavaScript Object Notation (JSON) is a subset of the JavaScript language used for the definition and exchange of data. While I’m not proposing that we create a similar standard using C#, I do want to illustrate some of the rich object initialization syntaxes of the language. This terse syntax can come in handy when defining data for things like unit tests, templating models, etc.

The following notation is correct in c#:

ushort = 0
ushort = 1
ushort = 2

The following notation is incorrect in c#:

ushort =-1

Object Initializers
Consider the following class.

class Point
{
 public int A { get; set; }
 public int B { get; set; }
}

Object initializers allow or permit you to create a new object and set its properties in the same statement. following is an example class.

var x = new Point { A = 0, B = 1 };

 




Next 5 multiple choice(s)

1

What is the difference between long and double?

2

Which of the following is not a built-in reference type?

3

What is the difference between uint and int?

4

What is the type of long keyword in C#?

5

The float keyword .net framework type?

Comments