public void SetParamValue(NativeParam param, object paramVal) { try { var displayVal = paramVal; switch (param.ParamTypeName) { case "Hash": { displayVal = String.Format("0x{0:X}", paramVal); break; } case "char*": { displayVal = "\"" + paramVal + "\""; break; } } param.ParamValue = displayVal.ToString(); _paramIndex++; } catch (Exception ex) { Debug.WriteLine(ex); } }