This is my code
public readonly ref struct RefStruct;
public static class Methods
{
public static void Main()
{
var item = new RefStruct();
item = DoSomething(item);
}
public static RefStruct DoSomething(RefStruct @struct)
{
return @struct;
}
}
And it'll give me an warning about RCS1231: Make parameter ref read-only. Yeah, I opened that warning for me.
But in this case, it shouldn't be added with in, or it'll give me another warning about Cannot return local variable 'item' by reference because it is not a 'ref' variable.
Is that possible to add an option about if it should work on ref struct?
Thanks!
This is my code
And it'll give me an warning about
RCS1231: Make parameter ref read-only. Yeah, I opened that warning for me.But in this case, it shouldn't be added with
in, or it'll give me another warning aboutCannot return local variable 'item' by reference because it is not a 'ref' variable.Is that possible to add an option about if it should work on
ref struct?Thanks!