> For the complete documentation index, see [llms.txt](https://andreyakinshin.gitbook.io/problembookdotnet/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://andreyakinshin.gitbook.io/problembookdotnet/ru/valuetypes/mutableproperty-p.md).

# «MutableProperty» (Задача)

Что выведет следующий код?

```csharp
public struct Foo
{
  public int Value;
  public void Change(int newValue)
  {
    Value = newValue;
  }
}
public class Bar
{
  public Foo Foo { get; set; }
}
void Main()
{
  var bar = new Bar { Foo = new Foo() };
  bar.Foo.Change(5);
  Console.WriteLine(bar.Foo.Value);
}
```

[Решение](/problembookdotnet/ru/valuetypes/mutableproperty-s.md)
