Advertisement
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;
- using System.Threading.Tasks;
- namespace ConsoleApplication51
- {
- class Address
- {
- public Address(string s1,string s2,System.DateTime dt)
- {
- city = s1;
- addressLine = s2;
- modifiedDate = dt;
- number = Convert.ToInt32(s2.Split()[0]);
- text = addressLine.Substring(s2.Split()[0].Length + 1, addressLine.Length -1- s2.Split()[0].Length);
- }
- string addressLine, city, text;
- int number;
- DateTime modifiedDate;
- public override string ToString()
- {
- return city + " " + addressLine + " " + modifiedDate.ToShortDateString() + " " + number + " " + text;
- }
- }
- class AddressList
- {
- Address[] M;
- int Count
- {
- get { }
- set { }
- }
- }
- class Program
- {
- static void Main(string[] args)
- {
- Address ad = new Address("Moscow", "223 Druzhinnikov street", new System.DateTime(2018,05,24));
- Console.WriteLine(ad);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement