我想docker for windows在Powershell中重新启动。
就像我可以在Powershell中使用一个命令来完成它一样。
我可以实施吗?
使用时Restart-Service *docker*:
是否存在键盘快捷键来完成Visual Studio代码中当前行的语句,如IntelliJ?
完整的声明是完整声明,我可以__CODE__巧妙地进入以完成当前行.
visual studio代码支持这个功能吗?
我想在C#中实现一个函数:
public string getName(object ob)
{
// TODO: if object has "Name" attribute, return "Name".Value, else return null;
}
Run Code Online (Sandbox Code Playgroud)
当我调用这个函数时
string result1 = getName(new {Name = "jack", Age = 12}) // result1 = "jack"
string result2 = getName(new {Age = 12}) // result2 = null
Run Code Online (Sandbox Code Playgroud)
我知道用JavaScript或其他动态语言很容易实现......我很好奇它是否可以在C#中实现?