示例#1
0
        static BaseResponse Divide()
        {
            var result = new DerivedResponse();

            result.Stack = "Hi";
            return(result);
        }
示例#2
0
        static void Main(string[] args)
        {
            Console.WriteLine(Sum().Data);
            Console.WriteLine(Message().Data);
            BaseResponse baseResponse = Divide();

            if (baseResponse.Status == true)
            {
                if (baseResponse is DerivedResponse)
                {
                    DerivedResponse result = (DerivedResponse)baseResponse;
                }
            }
            Console.Read();
        }