Your example has an integer expressed as a string. Let’s say your integer was actually an integer, and you want to take the integer and convert it to a binary string.
int value = 8;
string binary = Convert.ToString(value, 2);
Which returns 1000.
More Related Contents:
- Can you write if ( (x && y) || y || z) { do this;}? [closed]
- Create dynamic variable name
- What are the pros and cons to keeping SQL in Stored Procs versus Code [closed]
- Get public/external IP address?
- #if DEBUG vs. Conditional(“DEBUG”)
- Correct way to override Equals() and GetHashCode() [duplicate]
- How do I restart my C# WinForm Application?
- Using global keyboard hook (WH_KEYBOARD_LL) in WPF / C#
- RegEx Match multiple times in string
- Deserializing JSON with dynamic keys
- Are C# arrays thread safe?
- SQLite Database Locked exception
- ASP.NET Core MVC : How to get raw JSON bound to a string without a type?
- Mutating the expression tree of a predicate to target another type
- How to create a task (TPL) running a STA thread?
- How to recognize if a string contains unicode chars?
- Regex for IP address
- Cascade deleting with EF Core
- Determine if a type is static
- GetEntryAssembly for web applications
- Where in memory are nullable types stored?
- Create web service proxy in Visual Studio from a WSDL file
- When must we use extern alias keyword in C#?
- EF5 Getting this error message: Model compatibility cannot be checked because the database does not contain model metadata
- Async PartialView causes “HttpServerUtility.Execute blocked…” exception
- WPF checkbox binding
- Serializing interfaces
- Accessing a Dictionary.Keys Key through a numeric index
- Can I import a static class as a namespace to call its methods without specifying the class name in C#?
- How to set text to a control from resource file in design time?