write csv file method that call in clr environment