- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我有这个BdlTabItem
它接收类型为 DockableUserControl
的参数并想知道使用 uc.TabItem = this
在两者之间创建循环引用是否是一种不好的做法和 new BdlDockableWindow(this)
在构造函数完成之前。
我知道这种行为对于非托管 native 代码 (C++) 来说非常糟糕。因此,即使我没有收到任何警告或错误,我也会在这里询问我是否应该这样做。
public BdlTabItem(BdlTabControl parent, DockableUserControl uc, string title)
{
TabControlParent = parent;
UserControl = uc;
WindowParent = new BdlDockableWindow(this);
this.Content = UserControl;
UserControl.TabItem = this;
}
最佳答案
这是可以接受的,但会引发问题。为什么选项卡项实例化了一个新的 WindowParent
但父选项卡控件没有对它的引用?或者为什么窗口父级不是传入的用户控件的属性?似乎这种行为应该在其他地方。
关于c# - 在其自己的构造函数中将 "this"作为参数传递是一种不好的做法吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29830683/
如果您想分享更多信息,可以在这里找到整个资源 指针: https://github.com/sergiotapia/DreamInCode.Net 基本上,我的API将为其他开发人员提供
关闭。这个问题需要更多focused .它目前不接受答案。 想改进这个问题吗? 更新问题,使其只关注一个问题 editing this post . 关闭 5 年前。 Improve this qu
我不是 SCM 工具的经验丰富的用户,尽管我确信它们的用处,当然。 我在以前的工作中使用了一些不起眼的商业工具,在当前的工作中使用了 Perforce,并在我的小型个人项目中使用了 TortoiseS
所以我想知道一些我应该避免在 javascript 中做的事情以获得良好的 SEO 排名。在我的下一个站点中,我将广泛使用 jquery 和 javascript,但不想牺牲 SEO。那么您认为我应该
基本上,我想知道什么是避免 future CSS 代码出现问题和混淆的最佳方法... 像这样命名 CSS 属性: div#content ul#navigation div.float-left (真
我是一名优秀的程序员,十分优秀!