P
Paul Richardson
Hi,
What i'm trying to do is assign a class (i.e. UKPostCode) to a propety of
the UKAddress Class.
So for example:
class UKAddress
{
public string AddressLine1
{
get { ... }
set { ... }
}
....etc.
public UKPostCode PostCode
{
get { .... }
set { .... }
}
.....etc.
}
class UKPostCode
{ ....
public void AMethod() { ... } ... etc.
}
So i can do the following:
UKAddress address = new UKAddress();
address.PostCode.AMethod().
I know this can be done if i create a public field in the class as
UKPostCode, but that does not give may any checking with the set { ... }.
Thankyou in advance,
Paul R
What i'm trying to do is assign a class (i.e. UKPostCode) to a propety of
the UKAddress Class.
So for example:
class UKAddress
{
public string AddressLine1
{
get { ... }
set { ... }
}
....etc.
public UKPostCode PostCode
{
get { .... }
set { .... }
}
.....etc.
}
class UKPostCode
{ ....
public void AMethod() { ... } ... etc.
}
So i can do the following:
UKAddress address = new UKAddress();
address.PostCode.AMethod().
I know this can be done if i create a public field in the class as
UKPostCode, but that does not give may any checking with the set { ... }.
Thankyou in advance,
Paul R
