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
Answer Posted / 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 View All Answers
What is anonymous methods in c#?
Explain the role of Garbage collector and its generations?
What is the purpose of dependency injection?
Expalin the way you implement inheritance by using VB.NET/C#?
Are string objects mutable or immutable?
Give an example of a directcast.
What are the differences between static, public and void in c#?
what happens if you inherit multiple interfaces and they have conflicting method names?
What is mvc in c#?
What is new method in c#?
Why reflection is used in c#?
Is char * null terminated?
What is or operator in c#?
Why we use get and set method in c#?
Explain acid rule of thumb for transactions in c#.