I am studying another user's code, and there is a method like this:
public SomeClass DoSomething(string param1, [Optional, DefaultParameterValue("")] string optional)
Why would anyone use these attributes instead
public SomeClass DoSomething(string param1, string optional = "")
Is there a difference in behavior, etc.?
source share