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 / 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 |
What is the reason behind the invention of c#?
What is protected internal modifier in C#?
What is boolean conditions in c#?
Give an example to show for hiding base class methods?
How to call a function when a class implements 2 interfaces and function is present in both interfaces?
When should we use sealed class in c#?
Which property do we set on a Combo Box to display data on it prior to setting the DataSource ?
Are c# strings immutable?
Why main method is static in c#?
What are the drawbacks of extending an interface as opposed to extending a class?
What is an Interface in C#?
0 Answers TryTechnicals Pvt Ltd,
Define constructors
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)