Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ruby-csharp_script sample #9
# coding: utf-8
require 'ruby/csharp_script'
csharp_script = Ruby::CSharpScript::CSharpScript.new
code = <<"EOS"
using System;
for (int i=0; i<10; i++) {
Console.WriteLine("C#: " + i.ToString(" 0"));
}
1+1
EOS
result = csharp_script.evaluate_async(code)
puts "Ruby: " + result.to_s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment