.NET Fiddle

CSharp · Console

/Program.cs

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
					
public class Program
{
	public static void Main()
	{
		var l = Foo().ToList();
		l.Add(Foo());
		l.Add("Foo");
		Console.WriteLine(string.Join("/", l));
		
		var l1 = Bar().ToList();
		l1.Add(Bar());
		l1.Add((2, "Bar"));
		Console.WriteLine(string.Join("/", l1.Select(x => $"{x.Item1}-{x.Item2}")));
		
	}
	
	public static string Foo() => "Hello World";
	public static (int, string) Bar() => (1, "Hello World");
}

public static class ExtensionsOfT
{
    public static List<T> ToList<T>(this T t) => new List<T>();
}
;