Closed stromkos closed 1 month ago
I'll reference this issue to those asking why StbImageSharp uses so ancient C# standard. :) Anyway, feel free to make the PR replacing readonly with, say, readonly properties.
Unfortunately even updating the automatic readonly properties to make it C# 5 compatible still leaves the generated code that uses stackalloc initializers in the Png, Jpg, and Tga files which is C# 7.3... It starts flagging those once you make the first set of updates. Those are a bit riskier to change.
Edit: turns out those might not be too bad either since it is only the initialization and I have the older generated code. Might submit a PR :)
Should be fixed. Thanks @JakeLegendXIII!
There are three instances of the
readonly
keyword not compatable with the console version requirements.See https://github.com/MonoGame/MonoGame/issues/8459#issuecomment-2308668408
Adding
readonly
simply stops the reference from changing outside of a constructor. It is mostly useless on reference types.Please disable the IDE0044 warning, so Visual Studio stops complaining and offering to "correct" this non-issue.
#pragma warning disable IDE0044