.net
General .net posts
A contextual keyword is used to provide a specific meaning in the code, but it is not a reserved word in C#. CSharp 2.0 has following contextual keywords
partial - Defines partial classes, structs, and interfaces throughout the same compilation unit.
where Adds constraints to a generic declaration.
yield Used in an iterator block to return a value to the enumerator object or to signal the end of iteration.
value Used to set accessors and to add or remove event handlers.
PS : Leave your feedbacks/comments here
Microsoft Visual Studio 2005 Beta CountDown.... TheBetaExperience
14 Days to go ...
Reminder Service
PS : Leave your feedbacks/comments here
A .NET Component that uses COM+ services is called serviced components to distinguish it from the standard managed components.
It is a class that is authored in a CLS-compliant language and that derives directly or indirectly from the System.EnterpriseServices.ServicedComponent class. Classes configured in this way can be hosted in a COM+ application and can use COM+ services by way of the EnterpriseServices namespace.
The following table describes COM+ services and other functionality available to .NET Framework classes
| Topic |
Description |
| Automatic Transaction Processing |
Applies declarative transaction-processing features. |
| BYOT (Bring Your Own Transaction) |
Allows a form of transaction inheritance. |
| Compensating Resource Managers (CRMs) |
Applies atomicity and durability properties to non-transactional resources. |
| Just-in-Time Activation |
Activates an object on a method call and deactivates when the call returns. |
| Loosely Coupled Events |
Manages object-based events. |
| Object Construction |
Passes a persistent string value to a class instance on construction of the instance. |
| Object Pooling |
Provides a pool of ready-made objects. |
| Private Components |
Protect components from out-of-process calls. |
| Queued Components |
Provides asynchronous message queuing. |
| Role-Based Security |
Applies security permissions based on role. |
| SOAP Service |
Publishes components as XML Web services. |
| Synchronization |
Manages concurrency. |
PS : Leave your feedbacks/comments here
You should use the Delete() method to delete an event log cautiously. When an event log is deleted, all event source registered with it are also deleted, so no application can continue writing to that log. Do not attempt to delete an event log that was created by Windows or any other application that is important to you; if you do, those applications might crash or behave in unexpected ways.
PS : Leave your feedbacks/comments here
The FontStyle enumeration has a Flags attributes that allows bitwise operations on FontStyle values. For example, look at the following statement:
lblSampleText.Font.Style | FontStyle.Underline
Here the | operator will turn on all the bits representing the Underline style, returning a FontStyle value that adds Underline to the existing font Style of lblSampleText.
The following expression involves a bitwise exclusive OR (XOR) operation:
lblSampleText.Font.Style ^ FontStyle.Underline
This expression returns a FontStyle value that toggles the Underline font style of the label. If the label was already underlined, the new value has the underline removed; if the label was not underlined already, the Underline bits are set in the new value.
The following expression involving a bitwise AND does not have any effect because using AND with 1 always returns the original value:
lblSampleText.Font.Style & FontStyle.Underline
PS : Leave your feedbacks/comments here
Scott Hanselman has posted some excellent interview questions. Read it here .
What Great .NET Developers Ought To Know (More .NET Interview Questions) .
Top 10 Visual C# 2005 IDE Enhancements
- Refactoring
- Edit and Continue
- IntelliSense Code Snippets
- Enhanced IntelliSense
- Class Designer
- Debugger Visualizers
- Object Data Binding
- Code Definition Window
- Configurable Code Formatting and Coloring
- Auto using Statements
[Read More]
SnippetCompiler is a must have .net tool. It allows to test a small .net code. This tool from Jeff Key could be incredibly usefull in cutting down the time taken to experiment with a .net code.
Here are its features :
- Compiles and runs single or multiple C#, VB.NET and ASP.NET snippets.
- Optionally builds WinFormEXEs, console EXEs or DLLs.
- The user can store a library of templates.
- Displays compile errors, including the red squiggles.
- IntelliSense for static members and method signatures, as well as constructor signatures.
- Imports VS.NET projects.
- Conveniently sits in the notification area waiting to be useful.
- Exports snippets to HTML/RTF.
You can download its latest beta 2.0 version here.
Roland Weigelt's VS.net wish list.