In the provided example, the function declaration PrintBar is throwing an error because _bar is not a compile time constant. What is the best practice to avoid this issue?
using System;
class Foo
{
private readonly string _bar;
public Foo(string initBar)
{
_bar = initBar;
}
public void PrintBar(string value = _bar)
{
Console.WriteLine(value);
}
}