C
C#3y ago
Becquerel

Rider suggestion - creating a property for a DateTime field will introduce struct copying

I encountered this warning from Rider recently when refactoring some old code. I had a class with several DateTime fields and wanted to turn them into autoproperties. Rider warned me that this would introduce struct copying. I didn't get any compilation errors after this, so am I right in assuming it's just a potential performance issue? Why does a property accessor introduce struct copying when field access doesn't? Should I care?
1 Reply
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server