Click here to Skip to main content
15,891,692 members
Home / Discussions / C#
   

C#

 
GeneralRe: OpenFileDialog initial directory Pin
Radoslav Bielik20-Jan-04 7:51
Radoslav Bielik20-Jan-04 7:51 
QuestionHow to make Combinations Pin
jacal9920-Jan-04 7:02
jacal9920-Jan-04 7:02 
AnswerRe: How to make Combinations Pin
MaxGuernsey20-Jan-04 8:42
MaxGuernsey20-Jan-04 8:42 
AnswerRe: How to make Combinations Pin
leppie21-Jan-04 6:17
leppie21-Jan-04 6:17 
Generalconvert textstring to html Pin
Herman<T>.Instance20-Jan-04 5:26
Herman<T>.Instance20-Jan-04 5:26 
GeneralRe: convert textstring to html Pin
Heath Stewart20-Jan-04 5:39
protectorHeath Stewart20-Jan-04 5:39 
GeneralProperties Page Pin
Jose Fco Bonnin20-Jan-04 5:17
Jose Fco Bonnin20-Jan-04 5:17 
GeneralRe: Properties Page Pin
Heath Stewart20-Jan-04 5:30
protectorHeath Stewart20-Jan-04 5:30 
GeneralSystem.Diagnostics.Process.Start Pin
elena1234520-Jan-04 4:22
elena1234520-Jan-04 4:22 
GeneralRe: System.Diagnostics.Process.Start Pin
Heath Stewart20-Jan-04 4:36
protectorHeath Stewart20-Jan-04 4:36 
GeneralCOM Interop Pin
Ungi.20-Jan-04 3:47
Ungi.20-Jan-04 3:47 
GeneralRe: COM Interop Pin
Heath Stewart20-Jan-04 4:24
protectorHeath Stewart20-Jan-04 4:24 
GeneralRe: COM Interop Pin
Ungi.20-Jan-04 18:04
Ungi.20-Jan-04 18:04 
GeneralRe: COM Interop Pin
Heath Stewart21-Jan-04 3:42
protectorHeath Stewart21-Jan-04 3:42 
GeneralRe: COM Interop Pin
Ungi.21-Jan-04 20:23
Ungi.21-Jan-04 20:23 
GeneralGOT IT!!!! Pin
Ungi.28-Jan-04 2:14
Ungi.28-Jan-04 2:14 
Questionhow to avoid references Pin
Mephisto18720-Jan-04 3:44
Mephisto18720-Jan-04 3:44 
AnswerRe: how to avoid references Pin
Heath Stewart20-Jan-04 4:17
protectorHeath Stewart20-Jan-04 4:17 
GeneralRe: how to avoid references Pin
Mephisto18720-Jan-04 4:54
Mephisto18720-Jan-04 4:54 
GeneralRe: how to avoid references Pin
Heath Stewart20-Jan-04 5:26
protectorHeath Stewart20-Jan-04 5:26 
GeneralRe: how to avoid references Pin
Mephisto18720-Jan-04 22:12
Mephisto18720-Jan-04 22:12 
GeneralRe: how to avoid references Pin
Heath Stewart21-Jan-04 3:46
protectorHeath Stewart21-Jan-04 3:46 
GeneralRe: how to avoid references Pin
Mephisto18721-Jan-04 5:08
Mephisto18721-Jan-04 5:08 
AnswerRe: how to avoid references Pin
Jose Fco Bonnin20-Jan-04 5:30
Jose Fco Bonnin20-Jan-04 5:30 
You can use reflection to load an assembly.

<br />
Assembly a = Assembly.LoadFrom("your.dll");<br />
Type t = a.GetType("namespace.classname");<br />
MethodInfo m = t.GetMethod("method");<br />
object o = Activator.CreateInstance(t);<br />
object result = m.Invoke(o,new object[]{parameters});<br />


If you want to avoid call methods in this way, you can also create an interface with all the necessary information about the dll and when you call CreateInstance just cast to it. For instance:

<br />
public interface IAnInterface<br />
{<br />
     void Method();<br />
}<br />
.......<br />
<br />
IAnInterface anInterface = (IAnInterface)o.CreateInstance(atype);<br />
IAnInterface.Method();<br />

GeneralRe: how to avoid references Pin
Jose Fco Bonnin20-Jan-04 6:01
Jose Fco Bonnin20-Jan-04 6:01 

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.