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

How to declares a two-dimensional array in C#?

0 Answers   DELL,


Does c# support properties of array types?

0 Answers  


What are the collections in c#?

0 Answers  


Will finally block get executed if the exception had not occurred?

2 Answers  


Explain About DTS package

0 Answers   BirlaSoft,


What is a console file?

0 Answers  


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

0 Answers  


When a new instance of a type is created, what is the type of method implicitly called?

2 Answers  


What is the use of getcommandlineargs() method in c#.net?

0 Answers  


Is it possible to add two 50 digit numbers in .net? If yes what is the code snippet?

2 Answers   Cognizant, W3 Solutions, Zefer,


how can we pass parameters to a user control using delegates ?

1 Answers   IBM,


Can struct inherit from class c#?

0 Answers  


Categories