婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 知識庫 > Powershell中可以使用的.Net實用靜態方法

Powershell中可以使用的.Net實用靜態方法

熱門標簽:湖州電銷防封卡 什么渠道可以找外呼系統客戶 使用電話機器人電銷是否違法 金融電銷公司怎么辦理外呼系統 真人和電話機器人對話 信陽話務外呼系統怎么收費 電話智能外呼系統誠信合作 安徽400電話辦理 雷霆電話機器人電話

支持所有版本。

Powershell能夠使用.net靜態方法,比如下面有一些你常用的方法:

復制代碼 代碼如下:

[Math]::Round(7.9)
 
[Convert]::ToString(576255753217, 8)
 
[Guid]::NewGuid()
 
[Net.Dns]::GetHostByName('schulung12')
 
[IO.Path]::GetExtension('c:\test.txt')
 
[IO.Path]::ChangeExtension('c:\test.txt', 'bak')

要獲得更多的方法,你可以刪掉方括號后面的代碼,再添加兩個冒號,這時在Powershell_ISE中將會彈出這個類所有可選的方法及屬性。在Powershell控制臺中,你也可以使用TAB來獲取選擇方法屬性。

當然你也可以通過管道符查看他所有類型:

復制代碼 代碼如下:

PS> [Math] | Get-Member -MemberType *Method -Static


   TypeName: System.Math

Name            MemberType Definition                                                                                    
----            ---------- ----------                                                                                    
Abs             Method     static sbyte Abs(sbyte value), static int16 Abs(int16 value), static int Abs(int value), sta...
Acos            Method     static double Acos(double d)          
Asin            Method     static double Asin(double d)           
Atan            Method     static double Atan(double d)           
Atan2           Method     static double Atan2(double y, double x)
BigMul          Method     static long BigMul(int a, int b)  
Ceiling         Method     static decimal Ceiling(decimal d), static double Ceiling(double a)
Cos             Method     static double Cos(double d)
Cosh            Method     static double Cosh(double value                                                            
DivRem          Method     static int DivRem(int a, int b, [ref] int result), static long DivRem(long a, long b, [ref] ...
Equals          Method     static bool Equals(System.Object objA, System.Object objB)
Exp             Method     static double Exp(double d)             
Floor           Method     static decimal Floor(decimal d), static double Floor(double d)
IEEERemainder   Method     static double IEEERemainder(double x, double y)
Log             Method     static double Log(double d), static double Log(double a, double newBase)
Log10           Method     static double Log10(double d)
Max             Method     static sbyte Max(sbyte val1, sbyte val2), static byte Max(byte val1, byte val2), static int1...
Min             Method     static sbyte Min(sbyte val1, sbyte val2), static byte Min(byte val1, byte val2), static int1...
Pow             Method     static double Pow(double x, double y)
ReferenceEquals Method     static bool ReferenceEquals(System.Object objA, System.Object objB)
Round           Method     static double Round(double a), static double Round(double value, int digits), static double ...
Sign            Method     static int Sign(sbyte value), static int Sign(int16 value), static int Sign(int value), stat...
Sin             Method     static double Sin(double a)
Sinh            Method     static double Sinh(double value)  
Sqrt            Method     static double Sqrt(double d)
Tan             Method     static double Tan(double a)
Tanh            Method     static double Tanh(double value)
Truncate        Method     static decimal Truncate(decimal d), static double Truncate(double d)

要查看方法的參數,省略掉他的括號即可:

復制代碼 代碼如下:

PS> Get-Something -Path test
You entered test.

PS> [Math]::Round

OverloadDefinitions                                                                                                      
-------------------                                                                                                      
static double Round(double a
static double Round(double value, int digits)
static double Round(double value, System.MidpointRounding mode)
static double Round(double value, int digits, System.MidpointRounding mode
static decimal Round(decimal d
static decimal Round(decimal d, int decimals)
static decimal Round(decimal d, System.MidpointRounding mode)
static decimal Round(decimal d, int decimals, System.MidpointRounding mode)


您可能感興趣的文章:
  • 使用PowerShell .Net獲取電腦中的UUID
  • PowerShell中使用.NET將程序集加入全局程序集緩存
  • PowerShell入門教程之訪問.Net程序集、COM和WMI實例
  • Powershell小技巧之查看安裝的.Net framework版本信息
  • PowerShell中調用.NET對象的靜態方法、靜態屬性和類方法、類屬性例子
  • PowerShell中查看當前版本、Windows版本、.NET版本信息的代碼
  • 一個ASP.Net下的WebShell實例
  • PowerShell 定時執行.Net(C#)程序的方法
  • ASP.NET下使用WScript.Shell執行命令
  • 如何使用 Shell 腳本執行 .NET Core 應用

標簽:山南 運城 岳陽 六盤水 濟南 湛江 德州 鶴崗

巨人網絡通訊聲明:本文標題《Powershell中可以使用的.Net實用靜態方法》,本文關鍵詞  Powershell,中,可以使,用的,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《Powershell中可以使用的.Net實用靜態方法》相關的同類信息!
  • 本頁收集關于Powershell中可以使用的.Net實用靜態方法的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 阿坝县| 柳河县| 融水| 广元市| 喜德县| 元朗区| 怀来县| 吐鲁番市| 铜陵市| 尚义县| 玉屏| 宁陵县| 沽源县| 玉山县| 玉环县| 南召县| 资溪县| 佛学| 夹江县| 黑水县| 赞皇县| 榆林市| 佛坪县| 英德市| 资源县| 兴化市| 正镶白旗| 天峻县| 英山县| 大关县| 肇庆市| 古交市| 即墨市| 防城港市| 察雅县| 娱乐| 石阡县| 澄江县| 孝义市| 乐亭县| 简阳市|