Suraj Sararf

Suraj Sararf

  • NA
  • 12
  • 8.3k

Property lost when another class call it

Feb 6 2015 4:40 PM
i have three class. First Class where i declare property,in second class i set property value and third class for use its value.but in third class property is empty.

class1

class first { public string first{get; set;} } class2


class second
{ public second() { first f1=new first(); f1.first="hello"; } }

class third
class third { public third() { first f1=new first(); string nn=f1.first; } }

Answers (1)