Skip to content

Class ShortExtension

Namespace: Tool
Assembly: Tool.Net.dll

对Short进行升级

csharp
public static class ShortExtension

Inheritance

objectShortExtension

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Extension Methods

ObjectExtension.Add<T>(object, object, object), ObjectExtension.CopyEntity(object, object, params string[]), ObjectExtension.EntityToJson(object), ObjectExtension.EntityToJson(object, bool), ObjectExtension.EntityToJson(object, bool, string), DictionaryExtension.GetDictionary(object), TypeExtension.GetFieldKey(object, string, out bool), TypeExtension.GetFieldKey<T>(object, string, out bool), TypeExtension.GetFieldKey(object, Type, string, out bool), ObjectExtension.GetIntPtr(object), ObjectExtension.GetIntPtrInt(object), TypeExtension.GetPropertieFind(object, string, bool), TypeExtension.GetProperties(object), TypeExtension.GetPropertyKey(object, string, out bool), TypeExtension.GetPropertyKey<T>(object, string, out bool), TypeExtension.GetPropertyKey(object, Type, string, out bool), TypeExtension.GetValue(object, PropertyDescriptor), TypeExtension.GetValue(object, string, bool), TypeExtension.GetValue(object, string), ObjectExtension.Read<T>(object, object, int, int), ObjectExtension.Read<T>(object, int, object, int, int), DictionaryExtension.SetDictionary(object, IDictionary<string, object>), TypeExtension.SetFieldKey(object, string, object), TypeExtension.SetFieldKey<T>(object, string, object), TypeExtension.SetFieldKey(object, Type, string, object), TypeExtension.SetPropertyKey(object, string, object), TypeExtension.SetPropertyKey<T>(object, string, object), TypeExtension.SetPropertyKey(object, Type, string, object), TypeExtension.SetValue(object, PropertyDescriptor, object), TypeExtension.SetValue(object, string, object, bool), TypeExtension.SetValue(object, string, object), ObjectExtension.ToBase64String(object), ObjectExtension.ToBytes(object), ObjectExtension.ToBytes(object, out Type), DictionaryExtension.ToDictionary(object), DictionaryExtension.ToDictionary<T>(object), DictionaryExtension.ToIDictionary(object), DictionaryExtension.ToIDictionary<T>(object), ObjectExtension.ToJson(object), ObjectExtension.ToJson(object, JsonSerializerOptions), ObjectExtension.ToJsonWeb(object), ObjectExtension.ToJsonWeb(object, Action<JsonSerializerOptions>), ObjectExtension.ToTryVar<T>(object, T), ObjectExtension.ToVar<T>(object), ObjectExtension.ToVar(object, Type, bool), ObjectExtension.ToVar(object, string), ObjectExtension.ToXml(object)

Remarks

代码由逆血提供支持

Methods

Add(short[], short)

给数组加新的值

csharp
public static short[] Add(this short[] txt, short txt1)

Parameters

txt short[]

Short[]

txt1 short

新增的值

Returns

short[]

Ceiling(short, decimal)

当前数除以一个整数,返回一个向上取整的倍数

csharp
public static short Ceiling(this short txt, decimal txt1)

Parameters

txt short

int

txt1 decimal

除数

Returns

short

Contains(short[], short)

查找该Short数组中是否存在该值。

csharp
public static bool Contains(this short[] txt, short txt1)

Parameters

txt short[]

Short[]

txt1 short

查找的字符

Returns

bool

方法存在或不存在

Decrement(ref short)

原子方式-1

csharp
public static short Decrement(this ref short value)

Parameters

value short

Returns

short

GetArrayIndex(short[], int, int)

同于获取指定部分的内容

csharp
public static short[] GetArrayIndex(this short[] obj, int index, int count)

Parameters

obj short[]

对象数组

index int

从下标N开始

count int

到下标N结束

Returns

short[]

返回一部分的数组内容

Increment(ref short)

原子方式+1

csharp
public static short Increment(this ref short value)

Parameters

value short

Returns

short

ToBytes(short)

返回二进制流

csharp
public static byte[] ToBytes(this short txt)

Parameters

txt short

Short

Returns

byte[]

返回二进制流

基于Apache-2.0协议开源