It seemed to me that in F # the following two lines should give the same results:
let a = string v
let a = v.ToString()
V is assumed to be an object. It turns out if v is System.Guid, the first line just throws an exception:
System.FormatException occurred
Message="Format String can be only \"D\", \"d\", \"N\", \"n\", \"P\", \"p\", \"B\" or \"b\"."
Source="mscorlib"
StackTrace:
at System.Guid.ToString(String format, IFormatProvider provider)
InnerException:
I can, of course, deal with the Guides separately, the question is, what other objects will give me the same problems? Should I avoid using the string operator at all? In my case, the object could potentially be any
source
share