Click here to Skip to main content
15,910,872 members

Comments by mahakaal (Top 26 by date)

mahakaal 23-Feb-15 23:23pm View    
if i marks any method internal in abstract class, we can't override even a single method of that abstract class outside the assembly...
mahakaal 23-Feb-15 23:19pm View    
am not clear about it yet.
if making an abstract class internal can restrict it's access from outside the assembly than what is the purpose of making it's abstract method internal.

what are benefits in both context...
mahakaal 23-Feb-15 23:18pm View    
i am not clear about it yet.
if making an abstract class internal can restrict it's access from outside the assembly than what is the purpose of making it's abstract method internal.

what are benefits in both context...
mahakaal 23-Feb-15 0:26am View    
Thanks again Mika,

But what is the benefit of assigning derived class object to base class reference.

What if we don't do this and do in the below way
Shape[] shapes = new Shape[3];
shapes[0] = new Shape(100, 100);
shapes[1] = new Square(200, 200);
Circle circle1 = new Circle(300, 300)
foreach (Shape shape in shapes)
{
shape.Draw();
}
circle1.Draw();
mahakaal 23-Feb-15 0:02am View    
Thankx Mika,

i have gone through the article you have suggested.
There is a statement
shapes[2] = new Circle(300, 300);

What does it mean and what if we don't use the reference of shape and uses the reference of Circle

Circle Cicle1= new Circle(300, 300);

Sorry, May be this question will seems silly as i am not so good in OOP.