Answer the question
In order to leave comments, you need to log in
The setter of the zabindin property does not work, what could be the reason?
There is a class with N properties, all of them are bound with the necessary controls on the form (WPF).
Next, the structure is created
public struct MyStruct
{
public int Age {get;set;}
public string Name {get;set;}
}
private MyStruct _mm;
public MyStruct MM
{
get {return _mm;}
}
set
{
_mm = value;
OnPropertyChanged("MM");
}
ММ = new MyStruct
{
name = "123",
age = 456
};
Answer the question
In order to leave comments, you need to log in
Of course, the whole point is that it is a structure. And structures in c# are value types.
You placed a set block outside of a property block.
public MyStruct MM
{
get {return _mm;}
}
set
{
_mm = value;
OnPropertyChanged("MM");
}
public MyStruct MM
{
get {return _mm;}
set
{
_mm = value;
OnPropertyChanged("MM");
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question