Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Shape
- {
- public int shapeSize = 1;
- public virtual void Draw()
- {
- Console.WriteLine("Draw a shape");
- ShowShapeSize();
- }
- private void ShowShapeSize()
- {
- Console.WriteLine(shapeSize);
- }
- }
- public class Circle : Shape
- {
- //Can't change value here of shapeSize here??
- public override void Draw()
- {
- shapeSize = 2;
- base.Draw();
- Console.WriteLine("Testing none override");
- }
- }
Add Comment
Please, Sign In to add comment