控制 cmdlet 定义的属性

发布于 2024-10-06 04:48:03 字数 286 浏览 0 评论 0原文

我正在创建许多 Powershell cmdlet,并注意到在安装管理单元并执行以下命令后,参数数据类型被列为单个而不是编程的类型(在我的例子中为浮点型)。

get-command -pssnapin myPSSnapin | format-list definition

Definition : Get-Value -Param1<Single> -Param2<Single>

有谁知道我在哪里控制这些值,因为它不会自动选择正确的类型?

谢谢

I am creating a number of Powershell cmdlet's and am noticing that after I install my snap-in and execute the following command the parameter data types are listed as single instead of the types programmed (in my case float).

get-command -pssnapin myPSSnapin | format-list definition

Definition : Get-Value -Param1<Single> -Param2<Single>

Does anyone know where do I control these values since it is not automatically selecting the proper type?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

零崎曲识 2024-10-13 04:48:03

System.SingleSystem.Double 是浮点类型的 .NET 框架名称。 C# floatdouble 映射到它们,就像 intlong 映射到 System.Int32和<代码>System.Int64。

System.Single and System.Double are the .NET framework names for floating point types. C# float and double map to them just like int and long map to System.Int32 and System.Int64.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文