Solved

How does type faster in C# ???

Posted on 2004-09-11
6
237 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

724 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