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 difference between array and collection?
What is view model in c#?
If casting fails what type of exception is thrown?
What is the usage of Enumeration in C# Programming and is it good to use or not ?
Explain the difference between Metadata and Manifest
What are the types of operator?
When was c# created?
What is console based application?
Define property in c#.net?
How do you access a constant field declared in a class?
What are object pooling and connection pooling and difference? Where do we set the Min and Max Pool size for connection pooling?
Why delegates are required?
Why do we need static class in c#?
What are jagged arrays used for?
What is the difference between list and arraylist in c#?