how to use with and end with statement in c#?