Solved

How does type faster in C# ???

Posted on 2004-09-11
6
231 Views
Last Modified: 2010-04-15
I have an example  procedure  like that :

private void Form1_Load(object sender, System.EventArgs e)
{
      SqlClient.SqlConnection a=new SqlClient.SqlConnection();
}

When I declare a SqlConnection variable, I must remember the name of SqlConnection ....so how can I declare it faster like VB.NET....????
0
Comment
Question by:sonbinary
  • 3
  • 2
6 Comments
 
LVL 5

Expert Comment

by:tzxie2000
ID: 12034069
you can add an sqlconnection form toolbox to your form and change the property from IDE enviroment
this may be more easy to coding your program
0
 
LVL 5

Expert Comment

by:tzxie2000
ID: 12034074
you can add an sqlconnection from toolbox to your form and change the property from IDE enviroment
this may be more easy to coding your program
0
 

Author Comment

by:sonbinary
ID: 12034178
SqlConnection has just an example.....All  object in NET FRAMEWORK, if I want to declare an object...I must remeber it....In VB.NET , we easy to declare it....
example : dim a  as .....a list box appear and we will choose what object we want...
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 13

Accepted Solution

by:
BlackTigerX earned 250 total points
ID: 12034196
if you want to declare it dinamically here it is:

if you have

using System.Data.SqlClient;

previously in your using statements

all you would have to type would be

- "sqlCon" (Ctrl + Space, then select from the list, it'll be the first in the list, so just hit enter)
- " a = new " (note the space at the end)
- it then automatically comes up with the autocomplete list with sqlConnection selected by default, so you just hit enter
0
 
LVL 13

Expert Comment

by:BlackTigerX
ID: 12034198
oh... if you just want that list hit Ctrl+Space will do the same thing
0
 
LVL 13

Expert Comment

by:BlackTigerX
ID: 12034203
that's one of the things they're thinking about how to shorten in the next version of C#, so you don't have to type the type name twice like now
type variable = new type();
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now