Ask a Question related to ASP.NET General, Design and Development.
-
Kevin Spencer #1
Re: Use a class from another class
Your confusion lies in the fact that VB.Net automatically makes the name of
the DLL the top-level namespace of your classes defined therein. Therefore,
as "class1" is in a namespace called "component1" in a DLL named "test1.dll"
your reference should be to "test1.component1.class1".
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
[url]http://www.takempis.com[/url]
Complex things are made up of
lots of simple things.
"JH" <003___remove___@email.dk> wrote in message
news:m7qkivc763hjuu88j3vjpg6ejfd77mfk5c@4ax.com...> As subject says...
>
> I would like to do the same in "test2.vb" as I do in "test.aspx". But
> get a " type 'component1' is not defined " then I try to compile the
> "test2.vb" to a dll.
>
> What should I do to fix it ??
>
>
> test.aspx
> ------
> <%@ page language="vb" %>
> <%
> dim testcom1 as new component1.class1
> testcom1.function1()
> %>
> ------
>
>
> test1.vb ( /bin/test1.dll )
> ------
> namespace component1
> public class class1
> sub function1()
> end sub
> end class
> end namespace
> ------
>
>
> test2.vb ( /bin/test2.dll )
> ------
> namespace component2
> public class class2
> sub function2()
> dim testcom1 as new component1.class1
> testcom1.function1()
> end sub
> end class
> end namespace
> ------
>
Kevin Spencer Guest
-
#25580 [WFx]: set_error_handler to a class/method resets class properties when error occurs
ID: 25580 Updated by: sniper@php.net Reported By: paul dot liversidge at recycledpixels dot com Status: Wont... -
#25580 [Opn->WFx]: set_error_handler to a class/method resets class properties when error occurs
ID: 25580 Updated by: sniper@php.net Reported By: paul dot liversidge at recycledpixels dot com -Status: Open... -
#25580 [Opn]: set_error_handler to a class/method resets class properties when error occurs
ID: 25580 User updated by: paul.liversidge@recycledpixels.com Reported By: paul dot liversidge at recycledpixels dot com... -
#25580 [NEW]: set_error_handler to a class/method resets class properties when error occurs
From: paul dot liversidge at recycledpixels dot com Operating system: Windows XP PHP version: 4.3.2 PHP Bug Type: ... -
Can't find class java.lang.NoClassDefFoundError. (Wrong class path?)
While creating JVM, I am getting the following error: Can't find class java.lang.NoClassDefFoundError. (Wrong class path?) I gave all the... -



Reply With Quote

