1. Created a Solution
2. Added a vb project
3. Added a cs project
4. In the cs project Add a reference to our vb project by using the Project | Add Reference menu option.
' Parent.vb which makes the dll called vblib1 see (2.)
Public Class Parent
Public Sub New()
MsgBox("Constructor Parent")
End Sub
End Class
// Form1.cs
using System;
namespace cslib
{
using vblib1;
using System.Windows.Forms;
public class Form1 : Parent                
{
        public Form1()
        {
                MessageBox.Show("Form1 constructor");
        }
       
        public static void Main(System.String[] args)
        {
                Form1 f = new Form1();
        }
}
}
Now this works but what I really want to do is inherit JavaScript From CSharp
So I created a new solution and two cs projects ( how do you create a js project )
// ServerPush.js
import System;
package ServerPush
{               
public class jsServerPush
{
        function lib_setdata( vKey:String,
        vCode:String,
                vData:String ) : void
        {
                        //alert(vKey);
                        //alert(vCode);
                        //alert(vData);
        var y:int;
var x:int;
y=0;
        for ( x=0; x<10; x++)
{                       
                y = y + x;
        }
        }
}
}
// Mediator.cs
namespace montego.webserving.******
{
using ServerPush;
using System;
public class Mediator : jsServerPush        
{
        public Mediator()
        {
        System.String[] xargs = new System.String[3];
        xargs[ 0 ]= "Interface";
        xargs[1]= "Being";
        xargs[2]= "Called";
       
lib_setdata( xargs[ 0 ], xargs[1], xargs[2] );
        }
       
        public static void Main(System.String[] args)
        {
                Mediator f = new Mediator();
        }
}
}
But This causes a problem with ' using ServerPush '
Anybody know about this stuff ??
2. Added a vb project
3. Added a cs project
4. In the cs project Add a reference to our vb project by using the Project | Add Reference menu option.
' Parent.vb which makes the dll called vblib1 see (2.)
Public Class Parent
Public Sub New()
MsgBox("Constructor Parent")
End Sub
End Class
// Form1.cs
using System;
namespace cslib
{
using vblib1;
using System.Windows.Forms;
public class Form1 : Parent                
{
        public Form1()
        {
                MessageBox.Show("Form1 constructor");
        }
       
        public static void Main(System.String[] args)
        {
                Form1 f = new Form1();
        }
}
}
Now this works but what I really want to do is inherit JavaScript From CSharp
So I created a new solution and two cs projects ( how do you create a js project )
// ServerPush.js
import System;
package ServerPush
{               
public class jsServerPush
{
        function lib_setdata( vKey:String,
        vCode:String,
                vData:String ) : void
        {
                        //alert(vKey);
                        //alert(vCode);
                        //alert(vData);
        var y:int;
var x:int;
y=0;
        for ( x=0; x<10; x++)
{                       
                y = y + x;
        }
        }
}
}
// Mediator.cs
namespace montego.webserving.******
{
using ServerPush;
using System;
public class Mediator : jsServerPush        
{
        public Mediator()
        {
        System.String[] xargs = new System.String[3];
        xargs[ 0 ]= "Interface";
        xargs[1]= "Being";
        xargs[2]= "Called";
       
lib_setdata( xargs[ 0 ], xargs[1], xargs[2] );
        }
       
        public static void Main(System.String[] args)
        {
                Mediator f = new Mediator();
        }
}
}
But This causes a problem with ' using ServerPush '
Anybody know about this stuff ??
Comment