add type conversion for ATS to C#