Based on Adaptive Code with C#