Click here to Skip to main content
15,917,795 members
Home / Discussions / C#
   

C#

 
GeneralRe: Destroying objects. Pin
TylerBrinks24-Mar-05 4:22
TylerBrinks24-Mar-05 4:22 
GeneralDAAB of Enterprise Library Pin
_J_23-Mar-05 8:17
_J_23-Mar-05 8:17 
GeneralRe: DAAB of Enterprise Library Pin
turbochimp23-Mar-05 16:29
turbochimp23-Mar-05 16:29 
GeneralNeed help in C# Pin
WCH23-Mar-05 7:25
WCH23-Mar-05 7:25 
GeneralRe: Need help in C# Pin
Judah Gabriel Himango23-Mar-05 7:43
sponsorJudah Gabriel Himango23-Mar-05 7:43 
GeneralRe: Need help in C# Pin
WCH23-Mar-05 7:49
WCH23-Mar-05 7:49 
GeneralRe: Need help in C# Pin
Judah Gabriel Himango23-Mar-05 9:00
sponsorJudah Gabriel Himango23-Mar-05 9:00 
GeneralInterface Problems Pin
Ox53746F6E6523-Mar-05 6:27
Ox53746F6E6523-Mar-05 6:27 
Hi!

I got a litte problem with an interface.
An interface-declaration is provided in an DLL.
Application A loads at runtime a DLL with a class that implemented the interface mentioned above.

I have got this until now:

// works perfect
object oGen= (object) Activator.CreateInstance((cGenAssembly.GetTypes())[1]);

TheInterface iInt= oGen as iInt;

if (iInt== null)
{
MessageBox.Show("Error");
}
else
{
// Do some stuff
}
I get an InvalidCastException.
If I cast the generated object into a class (for example System.Windows.Forms.Form) i can call functions.

must I cast the generated object into the correct class and afterwards i can create the interface or is there another possibility?

thanks for your help

INT 19H
GeneralRe: Interface Problems Pin
leppie23-Mar-05 6:41
leppie23-Mar-05 6:41 
GeneralRe: Interface Problems Pin
Ox53746F6E6523-Mar-05 6:45
Ox53746F6E6523-Mar-05 6:45 
GeneralRe: Interface Problems Pin
J4amieC23-Mar-05 9:21
J4amieC23-Mar-05 9:21 
GeneralRe: Interface Problems Pin
Joel Lucsy23-Mar-05 7:10
Joel Lucsy23-Mar-05 7:10 
GeneralRe: Interface Problems Pin
Ox53746F6E6523-Mar-05 7:41
Ox53746F6E6523-Mar-05 7:41 
GeneralDispose Error Pin
JMichael246823-Mar-05 4:38
JMichael246823-Mar-05 4:38 
GeneralRe: Dispose Error Pin
mav.northwind23-Mar-05 6:04
mav.northwind23-Mar-05 6:04 
GeneralRe: Dispose Error Pin
JMichael246823-Mar-05 7:42
JMichael246823-Mar-05 7:42 
GeneralRe: Dispose Error Pin
mav.northwind23-Mar-05 19:10
mav.northwind23-Mar-05 19:10 
GeneralCreate table in access database Pin
webhay23-Mar-05 3:08
webhay23-Mar-05 3:08 
GeneralRe: Create table in access database Pin
mav.northwind23-Mar-05 6:14
mav.northwind23-Mar-05 6:14 
GeneralRe: Create table in access database Pin
webhay23-Mar-05 6:24
webhay23-Mar-05 6:24 
GeneralRe: Create table in access database Pin
mav.northwind23-Mar-05 19:37
mav.northwind23-Mar-05 19:37 
GeneralMultiThread reading from stream Pin
Snowjim23-Mar-05 2:55
Snowjim23-Mar-05 2:55 
GeneralRe: MultiThread reading from stream Pin
leppie23-Mar-05 3:28
leppie23-Mar-05 3:28 
GeneralRe: MultiThread reading from stream Pin
Snowjim23-Mar-05 4:02
Snowjim23-Mar-05 4:02 
GeneralRe: MultiThread reading from stream Pin
Dave Kreskowiak23-Mar-05 11:24
mveDave Kreskowiak23-Mar-05 11:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.