Clsperson H
Clsperson H
#include <iostream>
#include <string>
using namespace std;
class clsPerson
{
private:
string _FirstName;
string _LastName;
string _Email;
string _Phone;
public:
_FirstName = FirstName;
_LastName = LastName;
_Email = Email;
_Phone = Phone;
}
//Property Set
void SetFirstName(string FirstName)
{
_FirstName = FirstName;
}
//Property Get
string GetFirstName()
{
return _FirstName;
}
__declspec(property(get = GetFirstName, put = SetFirstName)) string FirstName;
//Property Set
void SetLastName(string LastName)
{
_LastName = LastName;
}
//Property Get
string GetLastName()
{
return _LastName;
}
__declspec(property(get = GetLastName, put = SetLastName)) string LastName;
//Property Set
void SetEmail(string Email)
{
_Email = Email;
}
//Property Get
string GetEmail()
{
return _Email;
}
__declspec(property(get = GetEmail, put = SetEmail)) string Email;
//Property Set
void SetPhone(string Phone)
{
_Phone = Phone;
}
//Property Get
string GetPhone()
{
return _Phone;
}
__declspec(property(get = GetPhone, put = SetPhone)) string Phone;
string FullName()
{
return _FirstName + " " + _LastName;
}
};