Change Type - CSharp System.Reflection

CSharp examples for System.Reflection:Type

Description

Change Type

Demo Code


using System.Text;
using System.Linq;
using System.ComponentModel;
using System.Collections.Generic;
using System;//from   ww w.  j  a  v a 2 s.  co  m

public class Main{
        public static T ChangeType<T>(string Value)
    {
        return (T)Convert.ChangeType(Value, typeof(T), null);
    }
}

Related Tutorials