C#.NET Multiple choices


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

Is s tring keyword a value type or reference type?


 

 

 

 



A


Solution:-

Example: Passing Value Type Variables

static void ChangeValue(int x)
{
  x = 200;

  Console.WriteLine(x);
}

static void Main(string[] args)
{
  int i = 100;

  Console.WriteLine(i);
 
  ChangeValue(i);
 
  Console.WriteLine(i);
}

Example: Passing Reference Type Variable

static void ChangeReferenceType(Student std2)
{
  std2.StudentName = "Steve";
}

static void Main(string[] args)
{
  Student std1 = new Student();
  std1.StudentName = "Bill";
 
  ChangeReferenceType(std1);

  Console.WriteLine(std1.StudentName);
}

 




Next 5 multiple choice(s)

1

Why C# doesn't support Multiple Inheritance?

2

A static method____

3

Which of the following interface to be implemented to disponse an object externally?

4

Creating a static class is the same as creating _______

5

By default interface methods are?

Comments