小编Jer*_*ite的帖子

有没有人设法在Windows 7上运行Visual Studio 2003?

是的,我知道......我可以设置运行XP的虚拟机.不幸的是,我们的构建环境需要同时运行VC2003,2005和2008,如果我可以在Windows 7上本地运行2003我们需要它的少数项目会更方便.

我意识到IDE中可能没有一些东西可用,但我能够在Windows Vista下运行2003,如果我能在Windows 7下获得相同的基本功能,我会非常高兴.

现在,在切换vc2003以在XP SP 2兼容模式下以管理员身份运行后编译时,打开*.pdb文件时出错.

谢谢!

visual-studio-2003 visual-studio windows-7

21
推荐指数
5
解决办法
4万
查看次数

在C#中返回两个列表的最佳方法是什么?

我几乎不好意思问这个问题,但作为很长一段时间的C程序员,我觉得也许我不知道在C#中做到这一点的最好方法.

我有一个成员函数,我需要返回两个自定义类型(List<MyType>)的列表,我事先知道,我将始终只有两个这样的列表的返回值.

显而易见的选择是:

public List<List<MyType>> ReturnTwoLists();
Run Code Online (Sandbox Code Playgroud)

要么

public void ReturnTwoLists(ref List<MyType> listOne, ref List<myType> listTwo);
Run Code Online (Sandbox Code Playgroud)

两者似乎都不是最优的.

关于如何改进这个的任何建议?

第一种方法并没有在语法中明确表示只返回2个列表,第二种方法使用引用而不是返回值,这看起来非c#.

c# coding-style list

16
推荐指数
2
解决办法
2万
查看次数

在WinRT中创建只读依赖项属性的最佳方法是什么?

在WinRT中似乎没有相应的RegisterReadOnly.

有一个很好的解决方法吗?

WinRT中的控件如何实现ActualWidthProperty之类的东西?

dependency-properties windows-runtime

6
推荐指数
1
解决办法
329
查看次数

当父成功将子元素绑定到另一个元素时,为什么绑定失败?

假设我有两个可以引用第三个UI对象的类(在本例中是一个按钮).

此外,父类可以包含子类的元素.

如果它们都以相同的方式绑定到同一个控件,则子节点会失败但父节点会成功.

这是WPF中的错误吗?


父母:

class MyFrameworkElement : FrameworkElement
{
    // A depenedency property that will contain a child element sub-element
    private static readonly DependencyProperty ChildElementProperty =
                    DependencyProperty.Register("ChildElement",
                    typeof(MyChildElement),
                    typeof(MyFrameworkElement),
                    new PropertyMetadata());

    [Category("ChildProperties")]
    public MyChildElement ChildElement
    {
        set { SetValue(ChildElementProperty, value); }
        get { return (MyChildElement)GetValue(ChildElementProperty); }
    }


    // Now, a reference to some other control, in this case we will bind a button to it!
    public UIElement ButtonReferenceInParent
    {
        get { return (UIElement)GetValue(ButtonReferenceInParentProperty); }
        set { SetValue(ButtonReferenceInParentProperty, value); …
Run Code Online (Sandbox Code Playgroud)

wpf xaml binding visual-tree logical-tree

2
推荐指数
1
解决办法
1861
查看次数