|
using System;
namespace WinFormMVC.Model
{
public class User
{
public enum SexOfPerson
{
Male = 1,
Female = 2
}
private string _FirstName;
public string FirstName
{
get { return _FirstName; }
set
{
if (value.Length > 50)
Console.WriteLine("Error! FirstName must be less than 51 characters!");
else
_FirstName = value;
}
}
private string _LastName;
public string LastName
{
get { return _LastName; }
set
{
if (value.Length > 50)
Console.WriteLine("Error! LastName must be less than 51 characters!");
else
_LastName = value;
}
}
private string _ID;
public string ID
{
get { return _ID; }
set
{
if (value.Length > 9)
Console.WriteLine("Error! ID must be less than 10 characters!");
else
_ID = value;
}
}
private string _Department;
public string Department
{
get { return _Department; }
set { _Department = value; }
}
private SexOfPerson _Sex;
public SexOfPerson Sex
{
get { return _Sex; }
set { _Sex = value; }
}
public User(string firstname, string lastname, string id, string department, SexOfPerson sex)
{
FirstName = firstname;
LastName = lastname;
ID = id;
Department = department;
Sex = sex;
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Mr.Volynsky Alex is a Software Engineer in a leading software company. Alex is skilled in many areas of computer science. He has over 14 years of experience in the design & development of applications using C/C++/STL, Python, Qt, MFC, DirectShow, JavaScript, VBScript, Bash and of course - C#/.NET.
In addition, Alex is the
active member of Intel® Developer Zone (he was awarded by Intel® Green Belt for his active contribution to the Intel Developer Zone community for developers using Intel technology).
Alex is also interested in the Objective-C development for the iPad/iPhone platforms and he is the developer of the free
15-puzzle game on the App Store.
Overall, Alex is very easy to work with. He adapts to new systems and technology while performing complete problem definition research.
His hobbies include yacht racing, photography and reading in multiple genres.
He is also fascinated by attending computer meetings in general, loves traveling, and also takes pleasure in exercising and relaxing with friends.
Visit his C++ 11
blog