Hi,
Well you are right .
i added the import in the top of my assembly and i added a reference to the
file which is a regular TLB file and not a DOT NET file !
And now its ok .
BUT when i m trying to compile my DLL i m getting the following error :
vbc : error BC31011: Unable to load referenced library
'c:\DLL\NanaCon stants.tlb': System Error &H8013110b&
c:\DLL\NanaCons tants.tlb : error BC31011: Unable to load referenced
library 'c:\DLL\NanaCon stants.tlb': System Error &H8013110b&
vbc : error BC30142: Unable to generate a reference to file
'c:\DLL\NanaCon stants.tlb'
(use TLBIMP utility to reference COM DLLs): unable to load
international DLL: VBC7ui.dll
C:\Components\G eneral.vb(6) : error BC30466: Namespace or type
'ConstantsFileS ystem' for the Imports 'NanaLib.Consta ntsFileSystem' cannot
be found.
Imports NanaLib.Constan tsFileSystem
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~
C:\Components\G eneral.vb(93) : error BC30451: Name 'naCREATE_FILE' is
not declared.
Optional ByVal Method As Integer =
naCREATE_FILE, _
~~~~~~~~~~~~~
"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:c6******** ****@ID-208219.news.uni-berlin.de...
* "Tiraman" <ti*****@netvis ion.net.il> scripsit: I have 2 Questions About Using Enum
1) i have the following Enum under my class but if i need to use it i
must use it like this
ConstantsFileSy stem.CREATE_FIL E
how can i use it just by the const name by doing like this CREATE_FILE
Public Enum ConstantsFileSy stem
CREATE_FILE = 0
APPEND_FILE = 1
OVERWRITE_FILE = 2
End Enum
'Imports ConstantsFileSy stem' on top of the file in which you want to
use the constants without qualifying them (I am not sure that this makes
much sense).
2) is it good to use Enum for public params which i need to use all over
my Assemblies ? (if not please recommend a better way)
Why not?
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>