コード例 #1
0
 /**
  * Combine a 2 value signed byte (8 bits per) into a set of signed short (16 bits x 1)
  */
 public static short CombineToShort(this ValueTuple <sbyte, sbyte> tuple)
 {
     return((short)tuple.CombineToUShort());
 }
コード例 #2
0
		/**
         * Convert the provided 4 value struct tuple into an array of 4 elements and return
         * The generated array
         */
		public static T[] ToArray<T>(this ValueTuple<T, T, T, T> tuple)
			where T : struct {
			return tuple.ToArray(new T[4], 0);
		}