Skip to content

Instantly share code, notes, and snippets.

View BojanKomazec's full-sized avatar
💭
DevOps Now!

Bojan Komazec BojanKomazec

💭
DevOps Now!
View GitHub Profile
using System;
using System.Threading.Tasks;
namespace ConsoleApp
{
class Program
{
static void Main(string[] args)
{
Foo().Wait();
using System;
using System.Threading.Tasks;
namespace ConsoleApp
{
class Program
{
static void Main(string[] args)
{
Foo().Wait();
Task<int> Foo()
{
return 0;
}
Task<int> Foo()
{
return Task.FromResult(0);
}
async Task<int> Foo()
{
return Task.FromResult(0);
}
async Task<int> Foo()
{
return 0;
}
async Task<int> Foo()
{
return await Task.FromResult(0);
}
using System.Threading.Tasks;
public class Program
{
public static void Main()
{
MainAsync().Wait();
}
private static async Task MainAsync()
using Foo;
public class Program
{
public static void Main()
{
var foo = new Foo(); // CS0118
}
}
using Foo; // not used, can be omitted
public class Program
{
public static void Main()
{
var foo = new Foo.Foo();
}
}