Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace ConsoleApplication1
- {
- class Program
- {
- static void Main(string[] args)
- {
- c1 c;
- c2 cc = new c2();
- c2 ccc = new c2(10);
- Console.WriteLine(cc.v);
- Console.WriteLine(ccc.v);
- }
- class c1
- {
- public int v;
- public c1()
- {
- v = 0;
- }
- public c1(int x)
- {
- v = x;
- }
- }
- class c2 : c1
- {
- }
- }
- }
Add Comment
Please, Sign In to add comment