O'Reilly logo

.NET Programming: A Practical Guide Using C# by Pradeep Tapadiya

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Contexts

Under .NET, a class can be configured to require certain services such as synchronization, transaction, just-in-time activation, security, and so on. These configuration settings together define a runtime environment for the instances of the class to live in. This runtime environment is referred to as the context and the configuration settings are called context attributes.

A context holds one or more like-minded objects. Whenever a new object is created, the runtime examines whether the creator's context is compatible with the context attributes specified on the object. If the context is found to be compatible, the object is created in this context. Otherwise, the runtime creates a new context and places the object there. Once created, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required