Skip to content

Instantly share code, notes, and snippets.

@m0sa
Created November 2, 2014 00:25
Show Gist options
  • Save m0sa/01a16f5dc056ce0e5c8d to your computer and use it in GitHub Desktop.
Save m0sa/01a16f5dc056ce0e5c8d to your computer and use it in GitHub Desktop.
Walk the #line
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string foobar = _s("$foo$ bar", new { foo = Foo() }), baz = Baz();
}
static string Foo() { return "Foo"; }
static string Baz() { return "Baz"; }
}
}
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string _s_123 = string.Concat(Foo(), " bar");
string foobar = _s_123, baz = Baz();
}
static string Foo() { return "Foo"; }
static string Baz() { return "Baz"; }
}
}
#line 1 "Program.Original.cs"
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
#line hidden
string _s_123 = string.Concat(Foo(), " bar");
#line 7
string foobar = _s_123 ,
#line 7
baz = Baz();
}
static string Foo() { return "Foo"; }
static string Baz() { return "Baz"; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment