473,407 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

C# Intellisence different that VB?

I'm a VB.Net developer trying to learn C# but there are some strange
differences that none of the books or articles I have cover. For
instance....

SqlConnection connCP = new SqlConnection();

connCP.

When I type that last period in VB, Intellsense shows me all of the
properties, methods, etc of my new connCP object. But in C# is shows me
nothing. I even compiled after entering the first line.

Is C# Intellsense different that VB or is my code wrong?

Thanks,

Tina
May 11 '06 #1
9 1254
Add

using System.Data.SqlClient;

That will help

B

"Tina" <ti**********@nospammeexcite.com> wrote in message
news:%2***************@TK2MSFTNGP02.phx.gbl...
I'm a VB.Net developer trying to learn C# but there are some strange
differences that none of the books or articles I have cover. For
instance....

SqlConnection connCP = new SqlConnection();

connCP.

When I type that last period in VB, Intellsense shows me all of the
properties, methods, etc of my new connCP object. But in C# is shows me
nothing. I even compiled after entering the first line.

Is C# Intellsense different that VB or is my code wrong?

Thanks,

Tina

May 11 '06 #2
Yeah. Your issue probably stems from the fact the VB.NET and Visual
Studio automatically Imports common namespaces into the project. You
propable didn't realize it was doing this for you behind the scenes. On
the other hand, in C# you have manually add the imports.

May 11 '06 #3

"tdavisjr" <td******@gmail.com> wrote in message
news:11*********************@j33g2000cwa.googlegro ups.com...
Yeah. Your issue probably stems from the fact the VB.NET and Visual
Studio automatically Imports common namespaces into the project. You
propable didn't realize it was doing this for you behind the scenes. On
the other hand, in C# you have manually add the imports.


But he claims that it compiled the first line.
May 11 '06 #4

"Nick Hounsome" <Ne**@NickHounsome.Me.Uk> wrote in message
news:uV******************@text.news.blueyonder.co. uk...

"tdavisjr" <td******@gmail.com> wrote in message
news:11*********************@j33g2000cwa.googlegro ups.com...
Yeah. Your issue probably stems from the fact the VB.NET and Visual
Studio automatically Imports common namespaces into the project. You
propable didn't realize it was doing this for you behind the scenes. On
the other hand, in C# you have manually add the imports.


But he claims that it compiled the first line.


Indeed. I've seen it do this too, but normally when I have a bit of code
elsewhere that is in correct (i.e. I missed off a semicolon or something)
but then that wouldn't have compiled either...
May 11 '06 #5
I already have it there.

Could it be that C# intellisense is not as effective as with VB? Maybe
because of VB's background compiler?
T

"Dumbell" <sq**********@hotmail.com> wrote in message
news:uN**************@TK2MSFTNGP04.phx.gbl...
Add

using System.Data.SqlClient;

That will help

B

"Tina" <ti**********@nospammeexcite.com> wrote in message
news:%2***************@TK2MSFTNGP02.phx.gbl...
I'm a VB.Net developer trying to learn C# but there are some strange
differences that none of the books or articles I have cover. For
instance....

SqlConnection connCP = new SqlConnection();

connCP.

When I type that last period in VB, Intellsense shows me all of the
properties, methods, etc of my new connCP object. But in C# is shows me
nothing. I even compiled after entering the first line.

Is C# Intellsense different that VB or is my code wrong?

Thanks,

Tina


May 11 '06 #6
I have all of the necessary imports. It even fails to expose connCP methods
when I spell them all out explicitly.
T

"tdavisjr" <td******@gmail.com> wrote in message
news:11*********************@j33g2000cwa.googlegro ups.com...
Yeah. Your issue probably stems from the fact the VB.NET and Visual
Studio automatically Imports common namespaces into the project. You
propable didn't realize it was doing this for you behind the scenes. On
the other hand, in C# you have manually add the imports.

May 11 '06 #7
Tina,

I had tha same problem and as soon as I added "using System.Data.SqlClient"
it worked
I have no idea.
Restart your machine.....

SA
"Tina" <ti**********@nospammeexcite.com> wrote in message
news:OF**************@TK2MSFTNGP05.phx.gbl...
I already have it there.

Could it be that C# intellisense is not as effective as with VB? Maybe
because of VB's background compiler?
T

"Dumbell" <sq**********@hotmail.com> wrote in message
news:uN**************@TK2MSFTNGP04.phx.gbl...
Add

using System.Data.SqlClient;

That will help

B

"Tina" <ti**********@nospammeexcite.com> wrote in message
news:%2***************@TK2MSFTNGP02.phx.gbl...
I'm a VB.Net developer trying to learn C# but there are some strange
differences that none of the books or articles I have cover. For
instance....

SqlConnection connCP = new SqlConnection();

connCP.

When I type that last period in VB, Intellsense shows me all of the
properties, methods, etc of my new connCP object. But in C# is shows me
nothing. I even compiled after entering the first line.

Is C# Intellsense different that VB or is my code wrong?

Thanks,

Tina



May 11 '06 #8
On Thu, 11 May 2006 09:52:18 -0700, "Tina"
<ti**********@nospammeexcite.com> wrote:
I have all of the necessary imports. It even fails to expose connCP methods
when I spell them all out explicitly.
T

"tdavisjr" <td******@gmail.com> wrote in message
news:11*********************@j33g2000cwa.googlegr oups.com...
Yeah. Your issue probably stems from the fact the VB.NET and Visual
Studio automatically Imports common namespaces into the project. You
propable didn't realize it was doing this for you behind the scenes. On
the other hand, in C# you have manually add the imports.


Check your intellisense settings. Are they set to automaticaly show or
do you have to push a short cut first (ie ctrl+space).
May 12 '06 #9
The intellisense setting are the same for C# and VB in VS.net. Besides,
intellisense appears to work ok when entering framework objects.
T
"Chris Chilvers" <ke****@dynafus.com> wrote in message
news:rm********************************@4ax.com...
On Thu, 11 May 2006 09:52:18 -0700, "Tina"
<ti**********@nospammeexcite.com> wrote:
I have all of the necessary imports. It even fails to expose connCP
methods
when I spell them all out explicitly.
T

"tdavisjr" <td******@gmail.com> wrote in message
news:11*********************@j33g2000cwa.googleg roups.com...
Yeah. Your issue probably stems from the fact the VB.NET and Visual
Studio automatically Imports common namespaces into the project. You
propable didn't realize it was doing this for you behind the scenes. On
the other hand, in C# you have manually add the imports.


Check your intellisense settings. Are they set to automaticaly show or
do you have to push a short cut first (ie ctrl+space).

May 12 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Bene | last post by:
Hey, I created a custom object. For the public properties I used /// <summary> /// xxx ///</summary and i used also the - attribute. I build a dll and referenced to it from another
1
by: Joseph Grant | last post by:
Help! I'm a newbie, and would like some info on this please: I have a project that requires me to write my own class. So far everything is working well, my class is working and compiling just...
5
by: Hendrik Schober | last post by:
Hi, we just run into the problem, that "default" alignment in the project properies dialog seem to be different. We have a project that's a DLL, which is linked with a couple of LIBs. All are...
7
by: Chris | last post by:
Hi, I am writing a webpage in C#. Visual Studio .NET. the following code does not provide me with intellisence on the context, session, and page.cache. When I put the large if...then...
2
by: Shaul Feldman | last post by:
Hello, is there any way to write explanation for code I write in vb.net so when this code is used (typed with intellisence) the explanation wrote with code would be showed? As if it was any built...
1
by: Rob Panosh | last post by:
Hello, Does anybody know of a control that I can put on a form that would allow intellisence at runtime? Sorta like the "Command Window" when debugging your source code. I would like to use...
27
by: Ben Finney | last post by:
Antoon Pardon wrote: > I just downloaded your enum module for python > and played a bit with it. IMO some of the behaviour makes it less > usefull. Feedback is appreciated. I'm hoping to...
2
by: Ariansen Jon Haakon | last post by:
Hi, I see that all objects in the framework sdk has description in intellisence. It would be nice to create descriptions on my own objects that I can see in intellisence. Is that possible?? In...
0
gagandeepgupta16
by: gagandeepgupta16 | last post by:
hi everyone, i need to create intellisence for the user defined functions, can anyone help me out of this? thnx in advance
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.