C# 源代码解决方案中的下划线标记!
怎么了,伙计们 我需要帮助 在该代码“return ControlTheDog(D,\uuuuuuuuuu)”的内部,\uuuuuuuuuu”部分需要添加C夏普格式的特定代码 在方法“NeedInjection”或/或“脱水”而不是“\uuuuuuuuuuuuu”之间进行选择的解决方案是什么?我已经努力找到了解决方案,但仍然无法解决 //全金属男孩C# 源代码解决方案中的下划线标记!,c#,c#-4.0,C#,C# 4.0,怎么了,伙计们 我需要帮助 在该代码“return ControlTheDog(D,\uuuuuuuuuu)”的内部,\uuuuuuuuuu”部分需要添加C夏普格式的特定代码 在方法“NeedInjection”或/或“脱水”而不是“\uuuuuuuuuuuuu”之间进行选择的解决方案是什么?我已经努力找到了解决方案,但仍然无法解决 //全金属男孩 using System; using System.Collections.Generic; using System.Lin
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);
}
public bool NeedInjection(Dog D)
{
return true;
}
public bool Dehydration(Dog D)
{
return false;
}
}
public class Dog
{
}
}
你在找这样的东西吗
return ControllTheDog(D, (DateTime.Now.DayOfWeek == DayOfWeek.Tuesday)
? new Validation(NeedInjection)
: new Validation(Dehydration));
哦,是的,诸如此类!谢谢你的支持这不是家庭作业…我在帮助我的一个朋友