mukesh kumar


{ City } noida
< Country > india
* Profession * se
User No # 14302
Total Questions Posted # 0
Total Answers Posted # 2

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 4
Users Marked my Answers as Wrong # 0
Questions / { mukesh kumar }
Questions Answers Category Views Company eMail




Answers / { mukesh kumar }

Question { Wipro, 44882 }

What are Sealed Classes in C#?


Answer

A class which restricts inheritance for security region is
called Sealed class.
Sealed class is the last class in hierarchy that why a
sealed class can be a derived class but can never be a base
class.
To access the members of sealed class we should create the
instance object.

Advantages of sealed class is it restrict the third party
vendor for developing new software by inheriting from our
logic.

Is This Answer Correct ?    4 Yes 0 No

Question { IBM, 18707 }

Given two strings like x=?hello? and y=?open?, remove any
character from string x which is also used in string y,
thus making the result x=?hll?.


Answer

string x = "?hello?", y = "?open?";
char strm = '?';
for (int ictr = 0; ictr < y.Length; ictr++)
{
if (!strm.Equals(y[ictr]))
{
x=x.Replace(Convert.ToString(y[ictr]),"");
}

}
Response.Write(x);

Results will be ?hhl?

Is This Answer Correct ?    0 Yes 0 No