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
Explain the difference between directcast and ctype.
How can you read 3rd line from a text file?
What are functions c#?
What is difference between a type and class?
Is typeof c#?
What is the use of table aliases?
What is typeof undefined?
Can a dictionary have duplicate keys c#?
Is arraylist thread safe?
Why delegates are type safe?
What is string class in c#?
What is tuple in c#?
What is delegation in oops?
What are c# collections?
What is the use of static members with example using c#.net.