Classes are open.
class Fixnum
def + x
- (- self - x - 1)
end
end
p 1 + 1
C#...
static class Program
{
static void Main(string[] args)
{
Console.WriteLine("1 + 1 = {0}", 1 + 1);
Console.ReadLine();
}
}
public class Console
{
public static void WriteLine(string format, object arg0)
{
if (arg0 is int)
{
arg0 = (int)arg0 + 1;
}
System.Console.WriteLine(format, arg0);
}
public static string ReadLine()
{
return System.Console.ReadLine();
}
}
No comments:
Post a Comment