- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我正在 Visual Studio 2010 Ultimate 中制作 Windows 窗体应用程序,但无法使内置 Vector 工作。
Microsoft 说有一个 System.Windows.Vector
在 .NET Framework 4 中:
也许我犯了一些大错误,但 Visual Studio 提示试图以任何方式使用 Vector,并且它没有出现在 IntelliSense 自动完成中:
行 Vector v = new Vector(20, 30);
给出
Compile error Error 1 The type or namespace name 'Vector' could not be found (are you missing a using directive or an assembly reference?)"
我尝试在顶部包含一个 using System.Windows
但这并没有解决问题。
我去 References -> Add Reference 试图找到要添加的东西,但没有什么是显而易见的。
问题可能是:在 System.Windows
中也列出了 Vector
命名空间,还有其他类,如 Rect
或 Application
。我可以将它们用作 System.Drawing.Rectangle
或 System.Windows.Forms.Application
,但这些都不显示为某些 System.Windows 命名空间的一部分
我已经尝试了大约 2 个小时的不同方法,并找到了 this related post (但是 Vector 是 .NET 4 的一部分,所以他们的修复似乎不值得?)和 this possibly related post但我确实安装了 .NET Framework 4。
有没有人有Vector
的例子?我知道我可以获得第三方类(class),但我觉得我错过了一些东西,并且想学习/发布解决方案以供其他人使用 google 搜索相同的问题。
最佳答案
添加对 WindowsBase 的引用。Vector
类在 System.Windows 命名空间内的 WindowsBase.dll 程序集中定义。
关于c# - 在 C# 中找不到 System.Windows.Vector,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6142690/
例如,我有一个父类Author: class Author { String name static hasMany = [ fiction: Book,
代码如下: dojo.query(subNav.navClass).forEach(function(node, index, arr){ if(dojo.style(node, 'd
我有一个带有 Id 和姓名的学生表和一个带有 Id 和 friend Id 的 Friends 表。我想加入这两个表并找到学生的 friend 。 例如,Ashley 的 friend 是 Saman
我通过互联网浏览,但仍未找到问题的答案。应该很容易: class Parent { String name Child child } 当我有一个 child 对象时,如何获得它的 paren
我正在尝试创建一个以 Firebase 作为我的后端的社交应用。现在我正面临如何(在哪里?)找到 friend 功能的问题。 我有每个用户的邮件地址。 我可以访问用户的电话也预订。 在传统的后端中,我
我主要想澄清以下几点: 1。有人告诉我,在 iOS 5 及以下版本中,如果您使用 Game Center 设置多人游戏,则“查找 Facebook 好友”(如与好友争夺战)的功能不是内置的,因此您需要
关于redis docker镜像ENTRYPOINT脚本 docker-entrypoint.sh : #!/bin/sh set -e # first arg is `-f` or `--some-
我是一名优秀的程序员,十分优秀!