opedog
opedog

Reputation: 746

Can I tell VS2008 to ignore debug-time evaluation of my lazily loaded properties?

In our .Net application, some of our business objects use lazy loading to access data from the server. While debugging, if I want to inspect a property I have to be very careful and not "look at" or access those properties because this causes the IDE to try and evaluate those properties, which fails. Is there an attribute I can put on those properties such that they will still display in Intellisense but not evaluated when the object is being inspected during debug-time?

Upvotes: 2

Views: 170

Answers (1)

jmservera
jmservera

Reputation: 6682

Try marking your properties with:

[DebuggerBrowsable(DebuggerBrowsableState.Never)]

Upvotes: 3

Related Questions