Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- /// <summary>
- /// Summary description for Customer
- /// </summary>
- public class Customer
- {
- private int customerId; //attribut
- public int CustomerId {
- get {return customerId;}
- }
- private string firstname;
- public string Firstname {
- get {return firstname;}
- }
- private string lastname;
- public string Lastname {
- get {return lastname;}
- }
- private string address;
- public string Address
- {
- get { return address; }
- }
- private string zipcode;
- public string Zipcode
- {
- get { return zipcode; }
- }
- private string city;
- public string City
- {
- get { return city; }
- }
- private string email;
- public string Email
- {
- get { return email; }
- }
- private string phone; //phone er string for at man kan skrive eks +45
- public string Phone{
- set {
- if (phone.Length <8 || phone.Length >50)
- {
- throw new Exception("Illigal phone number");
- }
- else
- {
- phone = value;
- }
- }
- get { return phone; }
- }
Add Comment
Please, Sign In to add comment