File tree Expand file tree Collapse file tree 3 files changed +12
-12
lines changed
cpp/VS_Snippets_CLR_System/system.appdomain.createinstancefrom_stringstring/cpp
csharp/VS_Snippets_CLR_System/system.appdomain.createinstancefrom_stringstring/cs
visualbasic/VS_Snippets_CLR_System/system.appdomain.createinstancefrom_stringstring/vb Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ public interface class ITest
66 void Test (String^ greeting);
77};
88
9- public ref class MarshallableExample : MarshalByRefObject, ITest
9+ public ref class MarshalableExample : MarshalByRefObject, ITest
1010{
1111public:
1212 virtual void Test (String^ greeting)
@@ -20,12 +20,12 @@ void main()
2020{
2121 // Construct a path to the current assembly.
2222 String^ assemblyPath = Environment::CurrentDirectory + " \\ " +
23- MarshallableExample ::typeid ->Assembly ->GetName ()->Name + " .exe" ;
23+ MarshalableExample ::typeid ->Assembly ->GetName ()->Name + " .exe" ;
2424
2525 AppDomain^ ad = AppDomain::CreateDomain (" MyDomain" );
2626
2727 System::Runtime::Remoting::ObjectHandle^ oh =
28- ad->CreateInstanceFrom (assemblyPath, " MarshallableExample " );
28+ ad->CreateInstanceFrom (assemblyPath, " MarshalableExample " );
2929
3030 Object^ obj = oh->Unwrap ();
3131
@@ -41,7 +41,7 @@ void main()
4141 ITest^ it = (ITest^) obj;
4242 it->Test (" Hi" );
4343
44- MarshallableExample ^ ex = (MarshallableExample ^) obj;
44+ MarshalableExample ^ ex = (MarshalableExample ^) obj;
4545 ex->Test (" Goodbye" );
4646}
4747
Original file line number Diff line number Diff line change @@ -6,18 +6,18 @@ public interface ITest
66 void Test ( string greeting ) ;
77}
88
9- public class MarshallableExample : MarshalByRefObject , ITest
9+ public class MarshalableExample : MarshalByRefObject , ITest
1010{
1111 static void Main ( )
1212 {
1313 // Construct a path to the current assembly.
1414 string assemblyPath = Environment . CurrentDirectory + "\\ " +
15- typeof ( MarshallableExample ) . Assembly . GetName ( ) . Name + ".exe" ;
15+ typeof ( MarshalableExample ) . Assembly . GetName ( ) . Name + ".exe" ;
1616
1717 AppDomain ad = AppDomain . CreateDomain ( "MyDomain" ) ;
1818
1919 System . Runtime . Remoting . ObjectHandle oh =
20- ad . CreateInstanceFrom ( assemblyPath , "MarshallableExample " ) ;
20+ ad . CreateInstanceFrom ( assemblyPath , "MarshalableExample " ) ;
2121
2222 object obj = oh . Unwrap ( ) ;
2323
@@ -33,7 +33,7 @@ static void Main()
3333 ITest it = ( ITest ) obj ;
3434 it . Test ( "Hi" ) ;
3535
36- MarshallableExample ex = ( MarshallableExample ) obj ;
36+ MarshalableExample ex = ( MarshalableExample ) obj ;
3737 ex . Test ( "Goodbye" ) ;
3838 }
3939
Original file line number Diff line number Diff line change @@ -6,20 +6,20 @@ Public Interface ITest
66 Sub Test( ByVal greeting As String )
77End Interface
88
9- Public Class MarshallableExample
9+ Public Class MarshalableExample
1010 Inherits MarshalByRefObject
1111 Implements ITest
1212
1313 Shared Sub Main()
1414
1515 ' Construct a path to the current assembly.
1616 Dim assemblyPath As String = Environment.CurrentDirectory & "\" &
17- GetType (MarshallableExample ).Assembly.GetName().Name & ".exe"
17+ GetType (MarshalableExample ).Assembly.GetName().Name & ".exe"
1818
1919 Dim ad As AppDomain = AppDomain.CreateDomain( "MyDomain" )
2020
2121 Dim oh As System.Runtime.Remoting.ObjectHandle =
22- ad.CreateInstanceFrom(assemblyPath, "MarshallableExample " )
22+ ad.CreateInstanceFrom(assemblyPath, "MarshalableExample " )
2323
2424 Dim obj As Object = oh.Unwrap()
2525
@@ -35,7 +35,7 @@ Public Class MarshallableExample
3535 Dim it As ITest = CType (obj, ITest)
3636 it.Test( "Hi" )
3737
38- Dim ex As MarshallableExample = CType (obj, MarshallableExample )
38+ Dim ex As MarshalableExample = CType (obj, MarshalableExample )
3939 ex.Test( "Goodbye" )
4040 End Sub
4141
You can’t perform that action at this time.
0 commit comments