Namespace Craziness

M

Martin c

Does anyone know a good referance site for Namespaces?
I'm trying to move some code to a codebehind page, but this line is
erroring:
dim strBlah = left(txtDomain,3) - Name 'Left' Is not declared
Do any of you loveley people know what namespace i need to import to get
that working? I currentlyey have:
Imports System
Imports System.Directoryservices
Imports System.IO
Imports System.Text
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Data
Imports System.Data.SqlClient

TIA
Martin
 
S

Steven Cheng[MSFT]

Hi Martin,


Thanks for posting in the community!
From your description, you are wondering which namespace to import since
you'd like to use the "Left" function of classic VisualBasic in VB.NET, yes?
If there is anything I misunderstood, please feel free to let me know.

As for this question, I think Eliyahu's answer is exact the one you want:
"Microsoft.VisualBasic". Add it in the project's reference list. Then, you
can use the "Left" as well as many other classic VisualBasic apis. For
detailed info on "Microsoft.VisualBasic" runtime library , you may view the
following reference in MSDN:

#Visual Basic Run-Time Library Members
http://msdn.microsoft.com/library/en-us/vblr7/html/vaoriVBRuntimeLibraryKeyw
ords.asp?frame=true


In addition, since you'd like to use the "left" function to do string
manipulation, would you please also have a look on the System.String class
in dotnet frame work. The String class also provide may good member methods
for string manipulation such as "Substring" "Replace" "IndexOf" "Split"
"Join" ...etc. You may view the following web link for more detailed
description:

#String Manipulation Example
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconStringManipulation
Example.asp?frame=true

Please check out the preceding suggestions. If you have any other
questions, please feel free post here.


Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top