public static void Main()
Segment<Key> test = new Segment<Key>();
var test2 = test as ISegment<SomeStructure>;
Console.WriteLine("Hello World");
public interface ISegment<out T>
public class SomeStructure
public class Key : SomeStructure
public class Segment<K> : ISegment<K> where K : SomeStructure