Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CLASSPATH?

Status
Not open for further replies.

henpat123

Programmer
Apr 14, 2005
35
US
Hi,
Does C#/ASP.NET/VB.net have the concept of CLASSPATH from Java?IF not how does applications work under .net?

henry
 
henry,

Unlike Java, C# and other .net languages are compiled to an executable. The class files associated with the project are managed by the visual studio IDE. With this in mind, you don't need to specify a class path. Instead, if you are using folders within your project, you need to specify the folder using the . operator.

Example

WindowsApplication1
-GUIFolder
-MyGUIControl
-References

-Form1

For form 1 to access MyGUIControl, it would need to say:

WindowsApplication1.GUIFolder.MyGUIControl guiControl = new WindowsApplication1.GUIFolder.MyGUIControl();

To shorten this process, .net allows you to specify paths with the "using" keyword.

using WindowsApplication1.GUIFolder;

Form1 can then say MyGUIControl guiControl = new GUIControl();


In short form: .net is magic.

Hope that helps in some way
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top