Output: Annotate float values with 'f' suffix (CS0664)

This commit is contained in:
Katy Coe
2019-11-18 06:06:42 +01:00
parent 7ca78175e0
commit b141e57598

View File

@@ -66,6 +66,8 @@ namespace Il2CppInspector.Reflection
public static string ToCSharpValue(this object value) { public static string ToCSharpValue(this object value) {
if (value is bool) if (value is bool)
return (bool) value ? "true" : "false"; return (bool) value ? "true" : "false";
if (value is float)
return value + "f";
if (value is string str) { if (value is string str) {
// Replace standard escape characters // Replace standard escape characters
var s = new StringBuilder(); var s = new StringBuilder();