auto code writing - C#