This page doesn't work on Internet Explorer. We recommend you try the new Microsoft Edge browser.
Customize the Try .NET editor to match your documentation, blog, or tutorial. Select from our default themes or build a complete custom theme.
Console
You can use the JavaScript postMessage
API to programmatically interact with an instance of Try .NET.
using System.Collections.Generic;
namespace FibonacciTest
{
public static class FibonacciGenerator
{
public static IEnumerable<int> Fibonacci()
{
int current = 1, next = 1;
while (true)
{
yield return current;
next = current + (current = next);
}
}
}
}
Console
Try .NET can load code directly from a GitHub Gist, either as a URL parameter when the iframe is loaded or via JavaScript.