Cast As generic type - CSharp System

CSharp examples for System:Type

Description

Cast As generic type

Demo Code



public class Main{
        public static T CastAs<T>(this object @object) {
            return (T) @object;
        }//  w  w  w.ja  v a  2s  .c  o m
}

Related Tutorials