Convert.ToString(MyVeryOwnByte, 2).PadLeft(8, '0');
This will fill the empty space to the left with ‘0’ for a total of 8 characters in the string
More Related Contents:
- How to know the size of the string in bytes?
- How can I check if a string contains two other strings [closed]
- .NET String.Format() to add commas in thousands place for a number
- What’s the @ in front of a string in C#?
- How to convert UTF-8 byte[] to string
- How to escape braces (curly brackets) in a format string in .NET
- Find and extract a number from a string
- Easiest way to read from and write to files
- Easiest way to split a string on newlines in .NET?
- Calling a function from a string in C#
- Split a string by another string in C#
- Convert a list to a string in C#
- Replace multiple characters in a C# string
- Is there a C# case insensitive equals operator?
- How to parse a string into a nullable int
- Remove text in-between delimiters in a string (using a regex?)
- Characters in string changed after downloading HTML from the internet
- Getting hash of a list of strings regardless of order
- Easier way of writing null or empty?
- How can I get a character in a string by index?
- What is the difference between .Equals and == [duplicate]
- How does StringBuilder work internally in C#?
- Truncate string on whole words in .NET C#
- Is there a “String.Format” that can accept named input parameters instead of index placeholders? [duplicate]
- split a string on newlines in .NET
- How can I Unescape and Reescape strings in .net?
- What does the @ prefix do on string literals in C#
- How to sort list of Ip Addresses using c#
- Operator ‘==’ cannot be applied to operands of type ‘char’ and ‘string’
- Why is the length of this string longer than the number of characters in it?