Binarysharp.MemoryManagement.Assembly.CallingConvention.CdeclCallingConvention.FormatParameters C# (CSharp) Method

FormatParameters() public method

Formats the given parameters to call a function.
public FormatParameters ( IntPtr parameters ) : string
parameters System.IntPtr An array of parameters.
return string
        public string FormatParameters(IntPtr[] parameters)
        {
            // Declare a var to store the mnemonics
            var ret = new StringBuilder();
            // For each parameters (in reverse order)
            foreach (var parameter in parameters.Reverse())
            {
                ret.AppendLine("push " + parameter);
            }
            // Return the mnemonics
            return ret.ToString();
        }