开发者

The source code solution in the underscore mark!

What's up guys!

I gonna need some help!

Inside of this code "return ControllTheDog(D, _____)); The part "_____" needed to be added with a specfic code in C sharp.

What is the solution to make a selection between method "NeedInjection" or/and "Dehydration" instead of "____"? Have worked hard to find a solution but I still can't solve it.

// FullmetalBoy

using System; 
    using System.Collections.Generic; 
    using System.Linq; 
    using System.Text;

    namespace ConsoleApplication1 {




            public class Program
            {
                static void Main(string[] args)
                {

                    Dog myDog = new Dog();

                    Doctor myDoctor = new Doctor();

                    myDoctor.GoToDoctor(myDog);

                }
            }



            public delegate bool Validation(Dog D);

            public class Doctor
            {

                public bool GoToDoctor(Dog D)
                {
                    return ControllTheDog(D, ______________ ));
                }




                private bool ControllTheDog(Dog D, Validation ValidationControl)
                {
                    return ValidationControl(D);
           开发者_Python百科     }



                public bool NeedInjection(Dog D)
                { 
                    return true;
                }

                public bool Dehydration(Dog D)
                { 
                    return false;
                }

            }



            public class Dog
            {


            }



        }


Are you looking for something like this?

return ControllTheDog(D, (DateTime.Now.DayOfWeek == DayOfWeek.Tuesday)
                         ? new Validation(NeedInjection)
                         : new Validation(Dehydration));
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜