Write an expression which satisfies the following statements:
(i) Creates an object of type q
(ii) If m is null, returns n, otherwise returns m
(iii) If x and y are string types, it concatenates x and y



Write an expression which satisfies the following statements: (i) Creates an object of type q (i..

Answer / sam

1)q objQ = new q();
2)string result = m??n;
3) if((typeof(string) == x.GetType()) && (typeof(string) == y.GetType() )
{
String.Concat(x,y);
}

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C Sharp Interview Questions

Explain how can you clean up objects holding resources from within the code?

0 Answers  


What is use of super class

4 Answers   NIIT,


Is c# substring zero based?

0 Answers  


What is a linked list c#?

0 Answers  


What is a base class in C#?

0 Answers   TryTechnicals Pvt Ltd,






Explain the accessibility modifier protected internal?

0 Answers  


list the steps in code compilation in c#?

0 Answers  


how to return morethan one value using out parameter in c#.net ; For Example : public int show(out int []a) { int []a={1,2,3,4,5}; return a[]; } we have to print all the values without using the Console.WriteLine statement;

1 Answers   Verizon,


What's new in c#?

0 Answers  


What are the Types of caching

0 Answers   TCS,


What is the difference between C# 3.5 and C# 4.0?

0 Answers  


What is the use of console?

0 Answers  


Categories