mp said:
Thanks for the info
This dll is still the first error and an important one for me to fix as I
use a class in that dll a lot
maybe there's a dotnet replacement for the object but I don't know
It's a component by Olaf Schmidt
I know him.
which has an awesome colllection type
object cSortedDictionary that I've gotten addicted to (with .Exists property
and .KeysByIndex etc that are very useful)
Don't know if there's an equivalent in dotnet
There are many different types of collections. Have a look in the
System.Collections, System.Collections.Generic and
System.Collections.Specialized namespaces.
I saw an old post on google groups that suggested putting a copy of the dll
in the project folder but that didn't help either...
any other thoughts?
You said "class", so it seems to be a ActiveX dll. Well, if you did
register it, remove the reference and set it again. (an interop wrapper
will be created automatically, and by default it should be in the right
location)
on another topic, in vb6 everyone avoided the scripting.FileSystemObject to
work with files like the plague.
right
in dotnet is it(or is't equivalent...what
ever it's called now) unavoidable?, for instance to get files, lists of
files, FileExists, stuff like that?
eg
things that FindFirstFile api would have been used for (for speed over fso)
VB.Net offers some VB special classes/functions, also for file access.
Many of them are not required because the Framework (the VB stuff is
also a part of it) already offers everything and it is the straighter way.
Have a look at the System.IO namespace. Some spontaneous thoughts (classes):
File access:
- FileStream: An object to access a file. All file access goes through
this object. It offers only basic read/write methods. Therefore there is the
- StreamWriter/StreamReader that offers plenty of methods to read/write
from/to a file. Including String conversion from/to Unicode. Be aware
that Strings are stored as Unicode in memory and use the right character
encoding when reading/writing from/to a file. You can specify the
Encoding when creating the StreamWriter/Reader, so it automatically does
the conversion if you call, for example, the StreamWriter's WriteLine
method.
Other file system classes: (as you've asked above)
- Directory: Offers several (shared) methods. For example
CreateDirectory, Delete, Exists, GetCreationTime
- File: Similar to Directory but for files
Referring to "FindFirstFile": Now you get the information about
files/directories in "FileSystemInfo" objects. The derived classes are
DirectoryInfo and FileInfo, depending on what it is. For example, if you
want to get all files (i.e. file system entries) in a directory, create
a DirectoryInfo object and call it's GetDirectories, GetFiles or
GetFileSystemInfos (which gets both types) methods. No need to call
FindFirstFile/FindNextFile.
Well, the object browser will be most helpful for getting an overview.
Armin