andros_rex@lemmy.world to Trans Memes@lemmy.blahaj.zone · 3 months agoprivate String gender;lemmy.worldimagemessage-square30linkfedilinkarrow-up1618arrow-down17
arrow-up1611arrow-down1imageprivate String gender;lemmy.worldandros_rex@lemmy.world to Trans Memes@lemmy.blahaj.zone · 3 months agomessage-square30linkfedilink
minus-squareFarid@startrek.websitelinkfedilinkarrow-up14arrow-down4·edit-23 months agoShould be enum. And don’t capitalize your variables.
minus-squarevalkyrieangela@lemmy.blahaj.zonelinkfedilinkEnglisharrow-up8·3 months agoenum implies that you cant change it, unless you were referring to the bool then true.
minus-squareFarid@startrek.websitelinkfedilinkarrow-up11·3 months agoYes, instead of boolean. But instead of String, too, for optimization reasons. You could always just add more enum constants to it.
minus-squareAnother Catgirl@lemmy.blahaj.zonelinkfedilinkEnglisharrow-up3·3 months agoThat requires a recompile though
minus-squareFarid@startrek.websitelinkfedilinkarrow-up6·3 months agoThink of the patch notes though. added 4 new genders
minus-squareCaveman@lemmy.worldlinkfedilinkarrow-up3·edit-23 months agoThe MS style guide, which most C# code follows, says so. https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/identifier-names#pascal-case I personally hate it and I prefer the java/js style. The braces are also horrible. Here’s an example. public class ExampleEvents { public bool IsValid; public IWorkerQueue WorkerQueue { get; init; } public event Action EventProcessing; public void StartEventProcessing() { static int CountQueueItems() => WorkerQueue.Count; // ... } }
Should be enum.
And don’t capitalize your variables.
enum implies that you cant change it, unless you were referring to the bool then true.
Yes, instead of boolean. But instead of String, too, for optimization reasons. You could always just add more enum constants to it.
That requires a recompile though
Think of the patch notes though.
C# disagrees
Idk C#, could you explain?
The MS style guide, which most C# code follows, says so.
https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/identifier-names#pascal-case
I personally hate it and I prefer the java/js style. The braces are also horrible. Here’s an example.
public class ExampleEvents { public bool IsValid; public IWorkerQueue WorkerQueue { get; init; } public event Action EventProcessing; public void StartEventProcessing() { static int CountQueueItems() => WorkerQueue.Count; // ... } }