More Group Sites
Education Books
School Rankings
Jobless Net
Better Home
Enviro++
更好教育论坛
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Share
Options
View
Go to last post Go to first unread
hong  
#1 Posted : Monday, 18 May 2009 12:52:10 AM(UTC)
hong

Rank: Administration

Reputation:

Groups: AcademicCoachingSchool, admin, Administration, BookSeller, CatholicSchool, CoachingAdult, CoachingProfessional, CoachingSports, ExtraCurriculumCoaching, IndependentSchool, Moderator, MusicTeacher, PrivateSchool, PublicSchool, SelectiveSchool, tutor
Joined: 23/11/2008(UTC)
Posts: 523

Key intellisense in Visual Studio 2005

List members
You can display a list of valid members from a type or namespace. When a member from the list is selected, you can press ENTER to insert that member into your code. You can always manually popup list members of the global scope using CTRL+J keyboard or the CTRL+SPACE shortcut.

Parameter Info
The Parameter Info feature opens the Parameters list to give you information about the number, names, and types of parameters required by a function or attribute.

Quick Info
The Quick Info option displays the complete declaration for any identifier in your code.

Complete Word
The Complete Word option types the rest of a variable, command, or function name once you have entered enough characters to disambiguate the term.

IntelliSense for Most Recently Used Members
IntelliSense can pre-select the members that you have recently selected in the pop-up List Members box for automatic object name completion. The history of most recently used members is cleared between each session in the IDE.

IntelliSense in the Immediate Mode Command Window
IntelliSense can increase your productivity and your ability to discover class members and parameter information while you are debugging in the Immediate Mode command window. IntelliSense in the Immediate Mode command window is only available when debugging is started, and is not available during design time expression evaluation.

Automatic Code Generation
Generate method stub
Test-driven development suggests that you should consume before you define. Using the Generate Method Stub operation, you avoid defining everything before you consume it. The Generate Method Stub IntelliSense operation can also increase productivity because you do not need to move from the calling code, your present focus, to the defining code, a separate focus, in order to generate a new method.

Hooking Up Events Using Intellisense (C#)
In the Code Editor, IntelliSense can help you hook up methods (event handlers) to event fields.

When you type the += operator after an event field in your .cs file, IntelliSense prompts you with the option to press the TAB key. This inserts a new instance of a delegate that points to the method handling the event.
Code:
this.button1.Click += new EventHandler(button1_Click);
private void button1_Click(object sender, EventArgs e) {}


IntelliSense for Override
When you type override and then press SPACEBAR, IntelliSense displays all of the valid base class members that you can override in a pop-up list box. Typing the return type of the method after override will prompt IntelliSense to only show methods that return the same type. When IntelliSense cannot find any matches, it will display all of the base class members.

Explicit Interface Implementation (C# Programming Guide)
Code:
interface IControl
{
    void Paint();
}
interface ISurface
{
    void Paint();
}
class SampleClass : IControl, ISurface
{
    // Both ISurface.Paint and IControl.Paint call this method.
    public void Paint()
    {
    }
}


To implement an interface in C# with explicit declarations using IntelliSense
Type : IComparable so the declaration becomes class Program : IComparable.
Activate the smart tag under IComparable. The following two options will appear:
1. Implement interface 'IComparable'.
2. Explicitly implement interface 'IComparable'.

Choose Explicitly implement interface 'IComparable'.
int IComparable.CompareTo(object obj)

To implement an interface in C# with implicit declarations using IntelliSense
Type : IComparable so the declaration becomes class Program : IComparable.
Activate the smart tag under IComparable. The following two options will appear:
1. Implement interface 'IComparable'.
2. Explicitly implement interface 'IComparable'.

Choose Implement interface 'IComparable'.
public int CompareTo(object obj)

To implement an abstract base class using IntelliSense
Type : StringComparer so the class declaration becomes class Program : StringComparer.
Click the smart tag under StringComparer, and click Implement abstract class 'System.StringComparer'.
IntelliSense adds three override methods from the StringComparer class to the Program class.
Sponsor
Rss Feed  Atom Feed
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.