using System;
using System.Linq;
class Program
{
static void ShowMethods(Type type) {
foreach (var method in type.GetMethods()) {
var parameterDescriptions = string.Join
(", ", method.GetParameters()
.Select(x => x.ParameterType + " " + x.Name)
.ToArray());
Console.WriteLine("{0} {1}({2})",
method.ReturnType,
method.Name,
parameterDescriptions);
}
}
static void Main() {
ShowMethods(typeof(BitConverter));
}
}
/*
run:
System.Byte[] GetBytes(System.Boolean value)
System.Boolean TryWriteBytes(System.Span`1[System.Byte] destination, System.Boolean value)
System.Byte[] GetBytes(System.Char value)
System.Boolean TryWriteBytes(System.Span`1[System.Byte] destination, System.Char value)
System.Byte[] GetBytes(System.Int16 value)
System.Boolean TryWriteBytes(System.Span`1[System.Byte] destination, System.Int16 value)
System.Byte[] GetBytes(System.Int32 value)
System.Boolean TryWriteBytes(System.Span`1[System.Byte] destination, System.Int32 value)
System.Byte[] GetBytes(System.Int64 value)
System.Boolean TryWriteBytes(System.Span`1[System.Byte] destination, System.Int64 value)
System.Byte[] GetBytes(System.UInt16 value)
System.Boolean TryWriteBytes(System.Span`1[System.Byte] destination, System.UInt16 value)
System.Byte[] GetBytes(System.UInt32 value)
System.Boolean TryWriteBytes(System.Span`1[System.Byte] destination, System.UInt32 value)
System.Byte[] GetBytes(System.UInt64 value)
System.Boolean TryWriteBytes(System.Span`1[System.Byte] destination, System.UInt64 value)
System.Byte[] GetBytes(System.Single value)
System.Boolean TryWriteBytes(System.Span`1[System.Byte] destination, System.Single value)
System.Byte[] GetBytes(System.Double value)
System.Boolean TryWriteBytes(System.Span`1[System.Byte] destination, System.Double value)
System.Char ToChar(System.Byte[] value, System.Int32 startIndex)
System.Char ToChar(System.ReadOnlySpan`1[System.Byte] value)
System.Int16 ToInt16(System.Byte[] value, System.Int32 startIndex)
System.Int16 ToInt16(System.ReadOnlySpan`1[System.Byte] value)
System.Int32 ToInt32(System.Byte[] value, System.Int32 startIndex)
System.Int32 ToInt32(System.ReadOnlySpan`1[System.Byte] value)
System.Int64 ToInt64(System.Byte[] value, System.Int32 startIndex)
System.Int64 ToInt64(System.ReadOnlySpan`1[System.Byte] value)
System.UInt16 ToUInt16(System.Byte[] value, System.Int32 startIndex)
System.UInt16 ToUInt16(System.ReadOnlySpan`1[System.Byte] value)
System.UInt32 ToUInt32(System.Byte[] value, System.Int32 startIndex)
System.UInt32 ToUInt32(System.ReadOnlySpan`1[System.Byte] value)
System.UInt64 ToUInt64(System.Byte[] value, System.Int32 startIndex)
System.UInt64 ToUInt64(System.ReadOnlySpan`1[System.Byte] value)
System.Single ToSingle(System.Byte[] value, System.Int32 startIndex)
System.Single ToSingle(System.ReadOnlySpan`1[System.Byte] value)
System.Double ToDouble(System.Byte[] value, System.Int32 startIndex)
System.Double ToDouble(System.ReadOnlySpan`1[System.Byte] value)
System.String ToString(System.Byte[] value, System.Int32 startIndex, System.Int32 length)
System.String ToString(System.Byte[] value)
System.String ToString(System.Byte[] value, System.Int32 startIndex)
System.Boolean ToBoolean(System.Byte[] value, System.Int32 startIndex)
System.Boolean ToBoolean(System.ReadOnlySpan`1[System.Byte] value)
System.Int64 DoubleToInt64Bits(System.Double value)
System.Double Int64BitsToDouble(System.Int64 value)
System.Int32 SingleToInt32Bits(System.Single value)
System.Single Int32BitsToSingle(System.Int32 value)
System.Boolean Equals(System.Object obj)
System.Int32 GetHashCode()
System.Type GetType()
System.String ToString()
*/