T
Tamir Khason
Hi,
How it is possible to implement such thing:
I want some properties will be readonly, based on value of other properties.
It should be something like this:
public class TEST
{
int m_int,j_int,k_int;
public int INT
{
get
{ return m_int;}
set
{m_int = value;}
}
public int JNT
{
get { return j_int;}
//if (m_int=5) /* HERE I WANT JNT READ ONLY IF INT=5
set
{j_int = value;}
}
//if(m_int!=10) /* HERE I DO NOT WANT THIS PROPERTY AT ALL IF INT=10
public int KNT
{
get
{ return k_int;}
set
{k_int = value;}
}
}
How it is possible to implement such thing:
I want some properties will be readonly, based on value of other properties.
It should be something like this:
public class TEST
{
int m_int,j_int,k_int;
public int INT
{
get
{ return m_int;}
set
{m_int = value;}
}
public int JNT
{
get { return j_int;}
//if (m_int=5) /* HERE I WANT JNT READ ONLY IF INT=5
set
{j_int = value;}
}
//if(m_int!=10) /* HERE I DO NOT WANT THIS PROPERTY AT ALL IF INT=10
public int KNT
{
get
{ return k_int;}
set
{k_int = value;}
}
}