首页 \ 问答 \ C#多向链接列表(C# Multiway Linked List)

C#多向链接列表(C# Multiway Linked List)

有没有办法让C#中的LinkedList指向多个子节点,而不只是一个? 即有没有办法将其变成多向链接列表?


Is there a way to make a LinkedList in C# point to multiple children, rather than just one? i.e. Is there a way to turn it into a Multi-Way Linked List?


原文:https://stackoverflow.com/questions/9749519
更新时间:2022-11-11 13:11

最满意答案

在Swift 2.0 beta 4中,你的祷告得到了回答; 这段代码变得合法:

@IBAction
func handleEvent(sender: AnyObject) {
    if sender.respondsToSelector("setHidden:") {
        sender.performSelector("setHidden:", withObject: true)
    }
}

In Swift 2.0 beta 4, your prayers are answered; this code becomes legal:

@IBAction
func handleEvent(sender: AnyObject) {
    if sender.respondsToSelector("setHidden:") {
        sender.performSelector("setHidden:", withObject: true)
    }
}

相关问答

更多
  • 更新了Swift 2.0(Xcode 7) 使用forEach : self.view.subviews.forEach { subview in subview.removeFromSuperview() } 或者像这样: view.subviews.forEach { $0.removeFromSuperview() } Updated for Swift 2.0 (Xcode 7) Use forEach: self.view.subviews.forEach { subview in ...
  • 在Swift 2.0 beta 4中,你的祷告得到了回答; 这段代码变得合法: @IBAction func handleEvent(sender: AnyObject) { if sender.respondsToSelector("setHidden:") { sender.performSelector("setHidden:", withObject: true) } } In Swift 2.0 beta 4, your prayers are answered; ...
  • 不幸的是,这在WPF中是不可能的。 您最接近的就是您在示例中演示的内容。 但是,如果要将样式应用于同一根容器中的所有 StackPanel,则可以将Style指定为根容器的资源,而不保留x:Key属性。 举个例子: