.NET

Facebook Twitter

Articles

Development Tools and Languages. Code Snippets. A code snippet is a block of reusable code that you can insert where you need it in your code.

Code Snippets

Snippets can be simple or more complex—for example, blocks such as try-finally and if-else are commonly used, but you could also use snippets to insert entire classes or methods. Visual Studio enables two kinds of code snippet: insertion snippets, which are added at a specified insertion point, and surround-with snippets (C# and C++ only), which are added around a selected block of code. To insert an insertion snippet in your code, put the cursor where you want the snippet to appear, open the shortcut menu, choose Insert Snippet, and then navigate to the snippet you want, select it, and press the Tab key.

Grasshopper – The Visual Studio Plugin for .NET Java applications. Mainsoft.com Search What is Grasshopper?

Grasshopper – The Visual Studio Plugin for .NET Java applications

Key features MSIL to Java bytecode compilation Java EE compliant applications. Failure trying to start user instance. Pre-defined Keyboard Shortcuts. You can more easily access a variety of commands and windows in Visual Studio by choosing the appropriate keyboard shortcut.

Pre-defined Keyboard Shortcuts

This topics lists the default shortcuts for the General Development profile, which you might have chosen when you installed Visual Studio. No matter which profile you chose, you can identify the shortcut for a command by opening the Options dialog box, expanding the Environment node, and then choosing Keyboard. You can also customize your shortcuts by assigning a different shortcut to any given command.

Data access

Visual C# C# (pronounced "C sharp") is a programming language that is designed for building a variety of applications that run on the .NET Framework.

Visual C#

C# is simple, powerful, type-safe, and object-oriented. The many innovations in C# enable rapid application development while retaining the expressiveness and elegance of C-style languages. Visual C# is an implementation of the C# language by Microsoft. Visual Studio supports Visual C# with a full-featured code editor, compiler, project templates, designers, code wizards, a powerful and easy-to-use debugger, and other tools. Extension Methods (C# Programming Guide) Extension methods enable you to "add" methods to existing types without creating a new derived type, recompiling, or otherwise modifying the original type.

Extension Methods (C# Programming Guide)

Extension methods are a special kind of static method, but they are called as if they were instance methods on the extended type. For client code written in C# and Visual Basic, there is no apparent difference between calling an extension method and the methods that are actually defined in a type. The most common extension methods are the LINQ standard query operators that add query functionality to the existing System.Collections.IEnumerable and System.Collections.Generic.IEnumerable<T> types.

To use the standard query operators, first bring them into scope with a using System.Linq directive. Access Modifiers (C# Reference) Access modifiers are keywords used to specify the declared accessibility of a member or a type.

Access Modifiers (C# Reference)

This section introduces the four access modifiers: The following five accessibility levels can be specified using the access modifiers: public: Access is not restricted. protected: Access is limited to the containing class or types derived from the containing class. XML Documentation Comments (C# Programming Guide) In Visual C# you can create documentation for your code by including XML elements in special comment fields (indicated by triple slashes) in the source code directly before the code block to which the comments refer, for example: /// <summary> /// This class performs an important function. /// </summary> public class MyClass{} When you compile with the /doc option, the compiler will search for all XML tags in the source code and create an XML documentation file.

XML Documentation Comments (C# Programming Guide)

To create the final documentation based on the compiler-generated file, you can create a custom tool or use a tool such as Sandcastle. Design Guidelines for Developing Class Libraries. This section provides guidelines for designing libraries that extend and interact with the .NET Framework.

Design Guidelines for Developing Class Libraries

The goal is to help library designers ensure API consistency and ease of use by providing a unified programming model that is independent of the programming language used for development. We recommend that you follow these design guidelines when developing classes and components that extend the .NET Framework. Inconsistent library design adversely affects developer productivity and discourages adoption.