You can use generics in S# through the syntax
MethodName<|TypeName|>(...)
For example it you have an Attach<T> method you can call it with the string type as follows:
Attach<|string|>(...)
and create instances of generic types:
list = new List<|string|>(...)
Example of using generic method:
C#:
public class TestGeneric
{
public string GenericGet<T>(T input)
{
return input.ToString();
}
}
S#:
a = new TestGeneric();
return a.GenericGet<|string|>('Hello World');