|
-
Apr 19th, 2002, 11:19 AM
#1
-
Apr 19th, 2002, 11:59 AM
#2
System.Reflection.Assembly.GetExecutingAssembly.Location
and use the .ToString method to add into a string
You may find it easier to import the System.Reflection.Assembly namespace
-
Apr 19th, 2002, 01:45 PM
#3
-
Apr 19th, 2002, 03:06 PM
#4
When an object inherits something it makes use of another objects methods. For example, if you create a class and build some custom properties and methods, your other code can utilize those methods/properties plus the GetType method, but you have no way explicitly removing it from memory. If you tell your class to Inherits System.Windows.Forms.Form
you Inherit the System.Windows.Forms.Form's objects ability to destroy itself along with several other methods.
Once you put an inheritence statement like the one above in your class you will see the Dispose() method available when you instanciate your class.
Importing a namespace is just a way to save typing. You could theoretically build a SQL Server data-driven app, for example, without importing System.Data.SqlClient, but everytime you call up an ADO.NET object you would have to type somthing like
Dim sConn as New System.Data.SqlClient.SqlConnection or Dim sCmd as New System.Data.Client.SqlCommand vs Dim sCmd as New SqlCommand("SELECT....
It also makes your code easier to read. Think of it as a multi-use giant With statement.
-
Apr 19th, 2002, 05:10 PM
#5
-
Apr 19th, 2002, 05:25 PM
#6
Another way....
This is a much more straightforward (in my opinion) replacement for VB6's App.Path:
System.Windows.Forms.Application.StartupPath
-
Apr 19th, 2002, 05:26 PM
#7
Originally posted by MrPolite
tnx alot for the info 
I think I saw something before but I dont remember where I found it. There were a series of functions to like get the filename, format a file path and these kind of file related functions. Any idea where they are on the framework?
You mean the functions in the System.IO.Path class? Try that.
-
Apr 19th, 2002, 06:25 PM
#8
Tygur, that's what I was looking for!
thanks
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|