【问题标题】:Visual Studio Code: The type or namespace name 'IntPtr' could not be foundVisual Studio 代码:找不到类型或命名空间名称“IntPtr”
【发布时间】:2020-07-31 14:30:24
【问题描述】:

如何让用户“Brian”在How to send text to Notepad in C#/Win32? 提交的代码在 Visual Studio Code 中工作。

我做了一个“Dotnet 添加包 System.Runtime”,似乎添加了 System.Runtime 包,但我仍然得到一个编译错误: WriteNotepad.cs(10,50):错误 CS0246:找不到类型或命名空间名称“IntPtr”(您是否缺少 using 指令或程序集引用?)

斯蒂芬

【问题讨论】:

    标签: c# visual-studio-code


    【解决方案1】:

    IntPtr 位于 System 命名空间中,因此将其包含在顶部。

    使用系统;

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-07-17
      • 1970-01-01
      • 2017-07-12
      • 2011-05-13
      • 1970-01-01
      • 2013-03-25
      相关资源
      最近更新 更多