CyrusBuilt.MonoPi.BitSet.ToString C# (CSharp) Метод

ToString() публичный Метод

Returns a System.String that represents the current CyrusBuilt.MonoPi.BitSet. For every index for which this bit set contains a bit in the set state, the decimal representation of that index is included in the result. Such indices are listed in order from lowest to highest, separated by ", " (a comma and a space) and surrounded by braces, resulting in the usual mathematical notation for a set of integers.
public ToString ( ) : string
Результат string
		public override string ToString() {
			StringBuilder sb = new StringBuilder("{");
			Boolean first = true;
			long bit = 0L;
			long word = 0L;
			for (Int32 i = 0; i < this._bits.Length; ++i) {
				bit = 1L;
				word = this._bits[i];
				if (word == 0) {
					continue;
				}

				for (Int32 j = 0; j < 64; ++j) {
					if ((word & bit) != 0) {
						if (!first) {
							sb.Append(", ");
						}
						sb.Append((64 * i + j).ToString());
						first = false;
					}
					bit <<= 1;
				}
			}

			return sb.Append("}").ToString();
		}