C# Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 209 Page Views: 

Is this code valid? Class T { public void CloneT(T obj) { this = obj; }}



Posted By: Avi Date: 14 October 2010 01:22:47 AM
 Answer:

No you cannot assign anything to this.


Posted By: avibtech


Date: 14 October 2010 01:22:47 AM
Post a better Answer if you have
 
(Will show your Gravatar icon)  
  Country flag

Loading
Enter the text as shown in the image P11S7M
Related Questions
C# : What is Obsolete in C#? How can one make a method obsolete?

What is Obsolete in C#? How can one make a method obsolete?

Obsolete attributemarks the program entity as the one that is not recommended to be used further. Us....
Category: C# Date: 10/1/2010 11:32:31 AM
C# : How are strings compared in C#?

How are strings compared in C#?

Generally , whenever the strings are to be compared using "==" or "!=" operators....
Category: C# Date: 10/1/2010 11:31:31 AM
C# : I want to declare a variable naming checked, but it gives an error Why?

I want to declare a variable naming checked, but it gives an error Why?

This is because checked is a keyword in C# and keywords can't be used as a variable name.
Category: C# Date: 10/1/2010 11:30:31 AM
C# : Is it possible to have the same name of the method in the derived class as it is in the base class?

Is it possible to have the same name of the method in the derived class as it is in the base class?

Yes. The base class and derived class can have the method with the same name. And when the method wi....
Category: C# Date: 10/1/2010 11:29:31 AM
C# : Name the variables which are under the control of the garbage collector?

Name the variables which are under the control of the garbage collector?

All the variables and objects which are under the process of the framework are under the control of....
Category: C# Date: 10/1/2010 11:28:31 AM