P
pbd22
Hi.
I need some help on object oriented design concepts. This question may
seem silly but I need a better understand of what is going on when a
type of class N is used within a method declaration. For example, I
have designed a "User" class and am using it such that:
public User GetUserByName(string first, string last)
{
// code...
}
I suppose I need a better understanding of how this method would be
called within the context
of a program. The User class is below.
Thanks.
public class User
{
#region Member Variables
protected int _ID
protected string _firstName;
protected string _lastName;
protected string _email;
protected string _password;
protected string _gender;
protected string _securityQuestion;
protected string _securityAnswer;
protected string _city;
protected string _state;
protected string _zipCode;
protected string _securityCode;
#endregion
#region Constructors
public User()
{
}
public User(int ID, string email, string password, string first,
string last,
string gender, string question, string answer, string
city,
string state, string zip)
{
this._email = email;
this._password = password;
this._firstName = first;
this._lastName = last;
this._gender = gender;
this._securityQuestion = question;
this._securityAnswer = answer;
this._city = city;
this._state = state;
this._zipCode = zip;
}
#endregion
#region Public Properties
public Guid _ID { get; set; }
public string _Email { get; set; }
public string _Password { get; set; }
public string _Gender { get; set; }
public string _City { get; set; }
public string _State { get; set; }
public string _ZipCode { get; set; }
public string _SecirtyCode { get; set; }
#endregion
#region Methods and Functions
#endregion
}
I need some help on object oriented design concepts. This question may
seem silly but I need a better understand of what is going on when a
type of class N is used within a method declaration. For example, I
have designed a "User" class and am using it such that:
public User GetUserByName(string first, string last)
{
// code...
}
I suppose I need a better understanding of how this method would be
called within the context
of a program. The User class is below.
Thanks.
public class User
{
#region Member Variables
protected int _ID
protected string _firstName;
protected string _lastName;
protected string _email;
protected string _password;
protected string _gender;
protected string _securityQuestion;
protected string _securityAnswer;
protected string _city;
protected string _state;
protected string _zipCode;
protected string _securityCode;
#endregion
#region Constructors
public User()
{
}
public User(int ID, string email, string password, string first,
string last,
string gender, string question, string answer, string
city,
string state, string zip)
{
this._email = email;
this._password = password;
this._firstName = first;
this._lastName = last;
this._gender = gender;
this._securityQuestion = question;
this._securityAnswer = answer;
this._city = city;
this._state = state;
this._zipCode = zip;
}
#endregion
#region Public Properties
public Guid _ID { get; set; }
public string _Email { get; set; }
public string _Password { get; set; }
public string _Gender { get; set; }
public string _City { get; set; }
public string _State { get; set; }
public string _ZipCode { get; set; }
public string _SecirtyCode { get; set; }
#endregion
#region Methods and Functions
#endregion
}