How can I reproduce this in ScriptSharp (C#):
myObject = function(input) {
}
myObject.prototype = new myOtherObject;
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When you’re using script# you’re using the c# syntax to create classes, derive classes etc.
So simply define your class myObject and have it derive from your other class myOtherObject, and let the compiler and bootstrapper script (mscorlib.js) set up the inheritance at runtime.
The whole point is to have a natural OOP syntax, rather than work with a simulation by manually chaining prototypes.
Hope that helps.