I write this code
struct Test
{
public override string ToString()
=> "some text";
}
Then I get a compiler message suggestion IDE0251 Member can be made 'readonly'
this message is gone by applying readonly modifier as following
struct Test
{
public override readonly string ToString()
=> "some text";
}
What this even mean? I don't see such case listed in readonly (C# Reference)
The closes case is with ref returns however the docs don't give me any clue what it means in above case.
Can any one state what a readonly here suppose to do?