小编spi*_*e.y的帖子

从类库中引用System.Windows.Forms

我正在创建一个类库,需要从PictureBox继承:public class Picture : PictureBox { ... }但是Forms当我尝试在类库的顶部添加一个using指令时,它不可用:using System.Windows.Forms;.我知道我可以通过右键单击解决方案资源管理器中的Referenced并选择Add Reference,然后从列表中添加System.Windows.Forms程序集来使其工作.

但它是好的做到这一点?它是没关系从类库引用WindowsForms?

.net c# winforms

4
推荐指数
1
解决办法
2817
查看次数

新的Windows Phone Silverlight 8.1应用程序

我刚刚将Windows Phone HTC 8S更新为Windows Phone 8.1开发者预览版,我想开始使用任何新的API.我确实遇到过Windows.Phone.System.LockScreenExtensibility命名空间,但它说:

支持的最低手机Windows Phone 8.1 [仅限Windows Phone Silverlight 8.1应用程序]

我们目前正在制作的普通Windows Phone 8应用程序和"Windows Phone Silverlight 8.1"应用程序之间是否存在差异?我以前从未听说过Silverlight 8.1应用程序.

c# silverlight windows-phone-8 windows-phone-8.1

3
推荐指数
1
解决办法
3057
查看次数

CSS框架有什么意义?

这些CSS框架有什么意义?我不明白他们.当我看到它们时,我看到的是无聊的布局,这些布局似乎过于难以适应您自己独特的设计.

是这样的,还是我在这里遗漏了一些东西?我指的是(一般的框架)像Blueprint,Less,Skeleton,960 Grid系统,Base,Gridless等等.

我知道这是一个非常简单的事情,但我只是不明白.我搜索过但没有发现任何可以帮助我理解重大事项的东西.当我看到他们的代码时,我看到的只是一团糟.遍布整个地方的奇怪的类和id名称.

(顺便说一句,这不是咆哮或抱怨,我真的不明白.)

html css html5 css3

3
推荐指数
1
解决办法
147
查看次数

为什么我的枚举在 switch 语句中不起作用?

我记得过去enum在语句中使用 s switch,并且根据C# how to use enum with switch我正在以正确的方式这样做。但我刚刚尝试再次执行此操作,但收到以下错误:

“ApplicationMode”是一种“类型”,但使用方式类似于“变量”。

这是我正在使用的代码:

public static enum ApplicationMode
{
    Edit,
    Upload,
    Sync,
    None
}

private void edit_Click(object sender, EventArgs e)
{
    switch(ApplicationMode) // This is where I see the error.
    {
        case ApplicationMode.Edit:
            break;
        ...
    }
}
Run Code Online (Sandbox Code Playgroud)

我做错了什么?

.net c# enums switch-statement

0
推荐指数
1
解决办法
2159
查看次数

Incorrect syntax near the keyword 'Order' - not like other questions with same title

I am literally going insane here. I keep getting the following exception:

Incorrect syntax near the keyword 'Order'.
Run Code Online (Sandbox Code Playgroud)

I have a TABLE with columns: Name, Credits, Extension, Order. Order is of type bigint. Now when I go to INSERT a single record into this table, it gives me the above exception.

I have put it in a try/catch block and caught the exception, I have set breakpoints and it does not reveal anything other than …

.net c# sql sql-server winforms

0
推荐指数
1
解决办法
751
查看次数