物件操作
8 個節點
本頁內容 8
建立物件
函數A new, empty object that holds no data and equals nothing but itself, useful as a unique marker or as something to lock on.
建立物件() -> 任意
object Create()
返回
| 結果 | 任意 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 物件操作
- 所屬包
- 標準庫
相等
函數Whether two values are equal, using the first value's own idea of equality (so two texts with the same characters are equal). Two nulls are equal, and a null is never equal to a non-null value; unlike ObjectRoutines.LogicalEquals, either input may be null.
相等(物件 A: 任意, 物件 B: 任意) -> 真否
bool Equals(object objA, object objB)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 物件 A | 任意 | — | The first value to compare, or null. |
| 物件 B | 任意 | — | The second value to compare, or null. |
返回
| 結果 | 真否 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 物件操作
- 所屬包
- 標準庫
取得雜湊碼
函數The value's hash code, the number dictionaries and sets use to file it. Equal values give equal hash codes, but different values can share one, and some (text, for example) change from one run of the program to the next, so it is not an identifier to store. Throws System.ArgumentNullException when Target is null.
取得雜湊碼(目標: 任意) -> 整數
int GetHashCode(object target)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 目標 | 任意 | — | The value to hash. |
返回
| 結果 | 整數 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 物件操作
- 所屬包
- 標準庫
取得型別
函數The actual type of the value at run time, which can be more specific than the type of the wire it arrived on. Throws System.ArgumentNullException when Target is null.
取得型別(目標: 任意) -> Type
Type GetType(object target)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 目標 | 任意 | — | The value to inspect. |
返回
| 結果 | Type |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 物件操作
- 所屬包
- 標準庫
邏輯相等
函數Whether Target considers itself equal to Obj, by whatever equality its type defines (which may be custom). Throws System.ArgumentNullException when Target is null; use ObjectRoutines.Equals when either side may be null.
邏輯相等(目標: 任意, 物件: 任意) -> 真否
bool LogicalEquals(object target, object obj)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 目標 | 任意 | — | The value whose equality rule is used. |
| 物件 | 任意 | — | The value to compare it with, or null. |
返回
| 結果 | 真否 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 物件操作
- 所屬包
- 標準庫
淺複製
函數A shallow copy of the value: a new object of the same type whose fields hold the same values as the original's, so any objects it refers to (lists, for example) are shared with the original rather than copied. Throws System.ArgumentNullException when Target is null.
淺複製(目標: 任意) -> 任意
object MemberwiseClone(object target)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 目標 | 任意 | — | The value to copy. |
返回
| 結果 | 任意 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 物件操作
- 所屬包
- 標準庫
引用相等
函數Whether two inputs are the very same object, not merely equal in content; two nulls count as the same. Numbers and other value types are copied separately when passed in, so they never compare as the same object, even with themselves.
引用相等(物件 A: 任意, 物件 B: 任意) -> 真否
bool ReferenceEquals(object objA, object objB)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 物件 A | 任意 | — | The first object, or null. |
| 物件 B | 任意 | — | The second object, or null. |
返回
| 結果 | 真否 |
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 物件操作
- 所屬包
- 標準庫
轉為文字
函數The value's text form, as its type defines it; a type that defines none gives its full type name. A number or a date is written the one way Divooka writes it, whatever region the machine is set to - 1.5, 2026-01-02 14:30:00 - and anything else that can be formatted, in the invariant culture. Throws System.ArgumentNullException when Target is null.
轉為文字(目標: 任意) -> 文字
string ToString(object target)
參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 目標 | 任意 | — | The value to describe. |
返回
| 結果 | 文字 |
備註
Round 24: the one spelling (Abstraction.ValueText), as Number to Text writes it - it used to write the machine's region's, so the same document gave "1,5" on a German machine.
- 所屬發行版
- 元編程(教育版)元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 物件操作
- 所屬包
- 標準庫