Sept. 27, 2023, 12:13 p.m. | ByteHide

DEV Community dev.to




Understanging “Fields”


In the object-oriented programming (OOP) approach of C#, a field is a class or struct level variable that holds data specific to an instance (object). It forms the identity of an instance, named as instance fields.


Try and keep your variables private (common practice to have an underscore as prefix) to prevent external access and only expose via properties or methods.


Do you keep your treasure box locked and hidden? That’s what private variables are like. They …

class csharp data dotnet forms identity instance object oop practice private programming variable

Consultant Sécurité SI H/F Gouvernance - Risques - Conformité - Nantes

@ Hifield | Saint-Herblain, France

L2 Security - Senior Security Engineer

@ Paytm | Noida, Uttar Pradesh

GRC Integrity Program Manager

@ Meta | Bellevue, WA | Menlo Park, CA | Washington, DC | New York City

Consultant Active Directory H/F

@ Hifield | Sèvres, France

Consultant PCI-DSS H/F

@ Hifield | Sèvres, France

Head of Security Operations

@ Canonical Ltd. | Home based - Americas, EMEA