What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » C# Dlls in scripts

C# Dlls in scripts
Author: Message:
Adeptus
Senior Member
****


Posts: 732
Reputation: 40
Joined: Oct 2005
RE: C# Dlls in scripts
quote:
Originally posted by Hilikus
activexObject calls the default constructor, what if i want to call a constructor with parameters??
Sorry, you can't.  Classes instantiated through COM interop must have a default (public, parameterless) constructor.

You should be able to easily work around this in most cases, by providing properties to set whatever you would have set through constructor's parameters. 

Where that isn't possible (you are using somebody else's class or it is essential to your logic to have the parameter passed at creation time), use a helper class with a public method which takes the parameters, creates the class instance passing parameters to the constructor, and returns the created object.
08-01-2006 02:58 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
C# Dlls in scripts - by Hilikus on 07-31-2006 at 04:21 AM
RE: C# Dlls in scripts - by Mnjul on 07-31-2006 at 10:55 AM
RE: C# Dlls in scripts - by Hilikus on 08-01-2006 at 02:00 AM
RE: C# Dlls in scripts - by Adeptus on 08-01-2006 at 02:58 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On