Questions tagged [properties]

A property, in some object-oriented programming languages, is a special sort of class member, intermediate between a field (or data member) and a method. Properties are read and written like fields, but property reads and writes are (usually) translated to get and set method calls.

Filter by
Sorted by
Tagged with
85
votes
9answers
8k views

Mutually exclusive properties

The question is probably quite simple, but I would like to hear what drawbacks we will have with our code. So, we had a simple implementation and interface for it: ...
7
votes
3answers
5k views

How to Make Strongly-typed References to Web.Config? [closed]

Let's say I have a configuration file with a property in it: <add key="LoadedCode" value="L" /> I know I can reference this using the ConfigurationManager: ...
6
votes
1answer
720 views

IQueryable Extensions working on expression for collection property

Followup to Repository searching code duplication My goal currently is to make the current implementation of my repository's IQueryable filtering less duplicative. First, I looked into passing ...
6
votes
1answer
472 views

Change tracking POCO entities

Description In a time where thin clients, web browsers, web services and micro services are prevalent, we tend to forget we still have to deal with thick and smart clients. Many applications in B2B ...
4
votes
1answer
109 views

Constraining a property setter fluently

The below code is aimed at providing you the most amount of control and flexibility with control which value gets set to a property. I Introduce to you, the ...
1
vote
2answers
403 views

EF Code First Identity/Info Storage

I've built this EF for storing data for web scraping. Any ideas? What am I missing? ...