Skip to main content
The 2024 Developer Survey results are live! See the results

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

9
  • What problem are you trying to solve? There is no implicit cast unless you implement that cast yourself. Commented May 2, 2016 at 7:04
  • A line of code did not give a compiler error, only at build time, which made me to start looking for the answer. The line of code was: if (oWordDoc.ActiveWindow.Selection.Text.EndsWith((char)7) And when I looked many posts stated what I have in my OP. This is what I want to clarify and make sure I have it right: that one always have to cast to string if he wants to use it as string.
    – ib11
    Commented May 2, 2016 at 7:13
  • 2
    According to MSDN, Chr returns a Char. Is it possible that VB just has an implicit cast from Char to String?
    – yaakov
    Commented May 2, 2016 at 7:40
  • 1
    "did not give a compiler error, only at build time" What's the difference between the compiler and build time?
    – yaakov
    Commented May 2, 2016 at 7:40
  • The difference is the real time compiling errors VS 2013 gives. It only reports the error when I build.
    – ib11
    Commented May 2, 2016 at 7:48