Dave Zych
  • Home
  • About
  • Contact
  • Privacy

string

A collection of 2 posts
binary

Converting an int to a binary string in C#

The .NET Framework has a built in overload of Convert.ToString [http://msdn.microsoft.com/en-us/library/14kwkz77%28v=vs.110%29.aspx] which takes 2 parameters: the int you want to convert and an int of the base you want to convert to. Utilizing this with base 2, you
Dec 6, 2013 1 min read
boxing

When doing string concatenation in C#, why don't you have to call ToString on non string variables?

To get the string representation of a variable, in this case we’ll use int, there is no implicit conversion from int to string so you can call the ToString method: string s = myInt; //INVALID!! string s = myInt.ToString(); // Valid! When concatenating with another string, though, you don’t have
Oct 23, 2013 1 min read
Page 1 of 1
Dave Zych © 2025
  • Data & privacy
  • Contact
Powered by Ghost