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\NanaConstants.tlb': System Error &H8013110b&
c:\DLL\NanaConstants.tlb : error BC31011: Unable to load referenced
library 'c:\DLL\NanaConstants.tlb': System Error &H8013110b&
vbc : error BC30142: Unable to generate a reference to file
'c:\DLL\NanaConstants.tlb'
(use TLBIMP utility to reference COM DLLs): unable to load
international DLL: VBC7ui.dll
C:\Components\General.vb(6) : error BC30466: Namespace or type
'ConstantsFileSystem' for the Imports 'NanaLib.ConstantsFileSystem' cannot
be found.
Imports NanaLib.ConstantsFileSystem
~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Components\General.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*****@netvision.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
ConstantsFileSystem.CREATE_FILE
how can i use it just by the const name by doing like this CREATE_FILE
Public Enum ConstantsFileSystem
CREATE_FILE = 0
APPEND_FILE = 1
OVERWRITE_FILE = 2
End Enum
'Imports ConstantsFileSystem' 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/>