adapter to csharp