Conversion.Oct 方法

定義

回傳一個字串,代表數字的八進位值。

多載

名稱 Description
Oct(UInt64)

回傳一個字串,代表數字的八進位值。

Oct(UInt32)

回傳一個字串,代表數字的八進位值。

Oct(UInt16)

回傳一個字串,代表數字的八進位值。

Oct(SByte)

回傳一個字串,代表數字的八進位值。

Oct(Byte)

回傳一個字串,代表數字的八進位值。

Oct(Int64)

回傳一個字串,代表數字的八進位值。

Oct(Int32)

回傳一個字串,代表數字的八進位值。

Oct(Int16)

回傳一個字串,代表數字的八進位值。

Oct(Object)

回傳一個字串,代表數字的八進位值。

Oct(UInt64)

重要

此 API 不符合 CLS 規範。

符合 CLS 規範替代方案
Microsoft.VisualBasic.Conversion.Oct(Int64)

回傳一個字串,代表數字的八進位值。

public:
 static System::String ^ Oct(System::UInt64 Number);
[System.CLSCompliant(false)]
public static string Oct(ulong Number);
[<System.CLSCompliant(false)>]
static member Oct : uint64 -> string
Public Function Oct (Number As ULong) As String

參數

Number
UInt64

必須的。 任何有效的數值表達式或 String 表達式。

傳回

一個代表數字八進位值的字串。

屬性

例外狀況

未指定 Number

Number 不是數字型。

範例

此範例使用 Oct 函數回傳數字的八進位值。

Dim testOct As String
' Returns "4".
testOct = Oct(4)
' Returns "10".
testOct = Oct(8)
' Returns "713".
testOct = Oct(459)

備註

如果 Number 還不是整數,則在評估前將其四捨五入為最接近的整數。

若數字為 十月回歸
零 (0)
任何其他數字 最多可達 22 個八進位字元

你可以直接用適當範圍內的前置數字表示八進位數。&O 例如, &O10 是十進位8的八進位符號。

另請參閱

適用於

Oct(UInt32)

重要

此 API 不符合 CLS 規範。

符合 CLS 規範替代方案
Microsoft.VisualBasic.Conversion.Oct(Int32)

回傳一個字串,代表數字的八進位值。

public:
 static System::String ^ Oct(System::UInt32 Number);
[System.CLSCompliant(false)]
public static string Oct(uint Number);
[<System.CLSCompliant(false)>]
static member Oct : uint32 -> string
Public Function Oct (Number As UInteger) As String

參數

Number
UInt32

必須的。 任何有效的數值表達式或 String 表達式。

傳回

一個代表數字八進位值的字串。

屬性

例外狀況

未指定 Number

Number 不是數字型。

範例

此範例使用 Oct 函數回傳數字的八進位值。

Dim testOct As String
' Returns "4".
testOct = Oct(4)
' Returns "10".
testOct = Oct(8)
' Returns "713".
testOct = Oct(459)

備註

如果 Number 還不是整數,則在評估前將其四捨五入為最接近的整數。

若數字為 十月回歸
零 (0)
任何其他數字 最多可達 22 個八進位字元

你可以直接用適當範圍內的前置數字表示八進位數。&O 例如, &O10 是十進位8的八進位符號。

另請參閱

適用於

Oct(UInt16)

重要

此 API 不符合 CLS 規範。

符合 CLS 規範替代方案
Microsoft.VisualBasic.Conversion.Oct(Int16)

回傳一個字串,代表數字的八進位值。

public:
 static System::String ^ Oct(System::UInt16 Number);
[System.CLSCompliant(false)]
public static string Oct(ushort Number);
[<System.CLSCompliant(false)>]
static member Oct : uint16 -> string
Public Function Oct (Number As UShort) As String

參數

Number
UInt16

必須的。 任何有效的數值表達式或 String 表達式。

傳回

一個代表數字八進位值的字串。

屬性

例外狀況

未指定 Number

Number 不是數字型。

範例

此範例使用 Oct 函數回傳數字的八進位值。

Dim testOct As String
' Returns "4".
testOct = Oct(4)
' Returns "10".
testOct = Oct(8)
' Returns "713".
testOct = Oct(459)

備註

如果 Number 還不是整數,則在評估前將其四捨五入為最接近的整數。

若數字為 十月回歸
零 (0)
任何其他數字 最多可達 22 個八進位字元

你可以直接用適當範圍內的前置數字表示八進位數。&O 例如, &O10 是十進位8的八進位符號。

另請參閱

適用於

Oct(SByte)

重要

此 API 不符合 CLS 規範。

符合 CLS 規範替代方案
Microsoft.VisualBasic.Conversion.Oct(Byte)

回傳一個字串,代表數字的八進位值。

public:
 static System::String ^ Oct(System::SByte Number);
[System.CLSCompliant(false)]
public static string Oct(sbyte Number);
[<System.CLSCompliant(false)>]
static member Oct : sbyte -> string
Public Function Oct (Number As SByte) As String

參數

Number
SByte

必須的。 任何有效的數值表達式或 String 表達式。

傳回

一個代表數字八進位值的字串。

屬性

例外狀況

未指定 Number

Number 不是數字型。

範例

此範例使用 Oct 函數回傳數字的八進位值。

Dim testOct As String
' Returns "4".
testOct = Oct(4)
' Returns "10".
testOct = Oct(8)
' Returns "713".
testOct = Oct(459)

備註

如果 Number 還不是整數,則在評估前將其四捨五入為最接近的整數。

若數字為 十月回歸
零 (0)
任何其他數字 最多可達 22 個八進位字元

你可以直接用適當範圍內的前置數字表示八進位數。&O 例如, &O10 是十進位8的八進位符號。

另請參閱

適用於

Oct(Byte)

回傳一個字串,代表數字的八進位值。

public:
 static System::String ^ Oct(System::Byte Number);
public static string Oct(byte Number);
static member Oct : byte -> string
Public Function Oct (Number As Byte) As String

參數

Number
Byte

必須的。 任何有效的數值表達式或 String 表達式。

傳回

一個代表數字八進位值的字串。

例外狀況

未指定 Number

Number 不是數字型。

範例

此範例使用 Oct 函數回傳數字的八進位值。

Dim testOct As String
' Returns "4".
testOct = Oct(4)
' Returns "10".
testOct = Oct(8)
' Returns "713".
testOct = Oct(459)

備註

如果 Number 還不是整數,則在評估前將其四捨五入為最接近的整數。

若數字為 十月回歸
零 (0)
任何其他數字 最多可達 22 個八進位字元

你可以直接用適當範圍內的前置數字表示八進位數。&O 例如, &O10 是十進位8的八進位符號。

另請參閱

適用於

Oct(Int64)

回傳一個字串,代表數字的八進位值。

public:
 static System::String ^ Oct(long Number);
public static string Oct(long Number);
static member Oct : int64 -> string
Public Function Oct (Number As Long) As String

參數

Number
Int64

必須的。 任何有效的數值表達式或 String 表達式。

傳回

一個代表數字八進位值的字串。

例外狀況

未指定 Number

Number 不是數字型。

範例

此範例使用 Oct 函數回傳數字的八進位值。

Dim testOct As String
' Returns "4".
testOct = Oct(4)
' Returns "10".
testOct = Oct(8)
' Returns "713".
testOct = Oct(459)

備註

如果 Number 還不是整數,則在評估前將其四捨五入為最接近的整數。

若數字為 十月回歸
零 (0)
任何其他數字 最多可達 22 個八進位字元

你可以直接用適當範圍內的前置數字表示八進位數。&O 例如, &O10 是十進位8的八進位符號。

另請參閱

適用於

Oct(Int32)

回傳一個字串,代表數字的八進位值。

public:
 static System::String ^ Oct(int Number);
public static string Oct(int Number);
static member Oct : int -> string
Public Function Oct (Number As Integer) As String

參數

Number
Int32

必須的。 任何有效的數值表達式或 String 表達式。

傳回

一個代表數字八進位值的字串。

例外狀況

未指定 Number

Number 不是數字型。

範例

此範例使用 Oct 函數回傳數字的八進位值。

Dim testOct As String
' Returns "4".
testOct = Oct(4)
' Returns "10".
testOct = Oct(8)
' Returns "713".
testOct = Oct(459)

備註

如果 Number 還不是整數,則在評估前將其四捨五入為最接近的整數。

若數字為 十月回歸
零 (0)
任何其他數字 最多可達 22 個八進位字元

你可以直接用適當範圍內的前置數字表示八進位數。&O 例如, &O10 是十進位8的八進位符號。

另請參閱

適用於

Oct(Int16)

回傳一個字串,代表數字的八進位值。

public:
 static System::String ^ Oct(short Number);
public static string Oct(short Number);
static member Oct : int16 -> string
Public Function Oct (Number As Short) As String

參數

Number
Int16

必須的。 任何有效的數值表達式或 String 表達式。

傳回

一個代表數字八進位值的字串。

例外狀況

未指定 Number

Number 不是數字型。

範例

此範例使用 Oct 函數回傳數字的八進位值。

Dim testOct As String
' Returns "4".
testOct = Oct(4)
' Returns "10".
testOct = Oct(8)
' Returns "713".
testOct = Oct(459)

備註

如果 Number 還不是整數,則在評估前將其四捨五入為最接近的整數。

若數字為 十月回歸
零 (0)
任何其他數字 最多可達 22 個八進位字元

你可以直接用適當範圍內的前置數字表示八進位數。&O 例如, &O10 是十進位8的八進位符號。

另請參閱

適用於

Oct(Object)

回傳一個字串,代表數字的八進位值。

public:
 static System::String ^ Oct(System::Object ^ Number);
public static string Oct(object Number);
static member Oct : obj -> string
Public Function Oct (Number As Object) As String

參數

Number
Object

必須的。 任何有效的數值表達式或 String 表達式。

傳回

一個代表數字八進位值的字串。

例外狀況

未指定 Number

Number 不是數字型。

範例

此範例使用 Oct 函數回傳數字的八進位值。

Dim testOct As String
' Returns "4".
testOct = Oct(4)
' Returns "10".
testOct = Oct(8)
' Returns "713".
testOct = Oct(459)

備註

如果 Number 還不是整數,則在評估前將其四捨五入為最接近的整數。

若數字為 十月回歸
零 (0)
任何其他數字 最多可達 22 個八進位字元

你可以直接用適當範圍內的前置數字表示八進位數。&O 例如, &O10 是十進位8的八進位符號。

另請參閱

適用於