S
Stone Zou
Hi:
i wrote code like following:
public class Class1
{
private String datapath ;
public String Datapath
{
get
{
return datapath;
}
set
{
setStringParam(value,datapath);
}
}
private void setStringParam(String val,String source)
{
if( val != null)
source =(String) val.Clone();
else
source = "";
}
}
}
and test function like
Class1 tmp = new Class1();
tmp.Datapath = "hello";
textBox1.Text = tmp.Datapath;
but the value of textBox1.Text is null, what happen?
thanks
stone
i wrote code like following:
public class Class1
{
private String datapath ;
public String Datapath
{
get
{
return datapath;
}
set
{
setStringParam(value,datapath);
}
}
private void setStringParam(String val,String source)
{
if( val != null)
source =(String) val.Clone();
else
source = "";
}
}
}
and test function like
Class1 tmp = new Class1();
tmp.Datapath = "hello";
textBox1.Text = tmp.Datapath;
but the value of textBox1.Text is null, what happen?
thanks
stone