here is the c# code which really helps you.