Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //базовый класс
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace ex1
- {
- class Base
- {
- int i1;
- int i2;
- int i3;
- protected internal int I1
- {
- get { return i1; }
- set
- {
- i1 = value;
- }
- }
- protected internal int I2
- {
- get { return i2; }
- set
- {
- i2 = value;
- }
- }
- protected internal int I3
- {
- get { return i3; }
- set
- {
- i3 = value;
- }
- }
- protected internal Base()
- {
- Random rnd = new Random();
- I1 = rnd.Next(0, 24);
- I2 = rnd.Next(0, 60);
- I3 = rnd.Next(0, 60);
- }
- protected internal Base(int a, int b, int c)
- {
- I1 = a;
- I2 = b;
- I3 = c;
- }
- public override string ToString()
- {
- return i1.ToString() + " " + i2.ToString() + " " + i3.ToString() + " ";
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement