Casting and Convert method in C# - C#