answersLogoWhite

0


Best Answer

C# EXAMPLE

String text="My sample data";

System.Text.ASCIIEncoding encode=new System.Text.ASCIIEncoding();

//convert to binary and store in a byte[]
byte[] binaryArray=encode.GetBytes(text);

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you convert text into binary in vb or c sharp code?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What Is The Code To Show An Html A Text?

<code><code>HTML TEXT HERE</code></code>


Text files and binary files are considered to be WHAT files?

different files


What is binary tree travesal?

It's the process of stepping through each node of a binary tree so that you reach each one at least once. Binary tree traversal is special in that the output of the tree is sorted. If you're looking for how it is done, I would highly recommend reading up on binary trees. It is easy to describe in pictures or code. I recommend against trying to get a description in text, it would only be confusing.


How do you convert the HTML file in to text file?

All HTML files are text files. You can open them with any text editor, such as Notepad. When a browser opens the file, it reads it and displays the html as a web page. If you open a html file in a text editor or a word processor or other such application, you will see the actual html code, which is just ordinary text. So you don't need to convert HTML files into text, as they are already text files. All you need is something to open them with, other than a browser.


What is the difference between a compiler and a text editor?

An editor is just a program in which you write and edit the program. The compiler is used to compile the program, i.e., convert the program to machine understandable code. A development environment often combines the both into an intelligent application called the IDE or Integrated Development Environment.

Related questions

How do you convert binary code to text code and text to binary?

You can are ASCII-tabellen. For converting binary to text


What coding method is used by the computer to convert text into Binary?

the binary numeral system


How the computer can understand binary language?

The computer understands binary because the 1 means on and the 0 means off, so that controls how it operates. Binary language is then converted to our number system where the numbers represent things. ASCII code is used to convert binary to text.


What does 010000100110010100100000011100110111010101110010011001 mean?

Error: Malformed binary. Your binary code is must be divisible by 8.This looks like it is the beginning of a binary code, but is not computable into any text as is. Do you have the rest of the code?


What is the purpose of binary codes?

A Binary code is a way of representing text or computer processor instructions by the use of the binary number system's two-binary digits 0 and 1.So the purpose of binary code is to issue human readable code, changed to machine code (binary) that the computer understands and can execute the instructions.


How is text represented in main computer memory?

By using a binary number called ASCII code


Convert the decimal fraction of 0.32 to binary using the sum of weight method?

This is actually a question in my Digital Circuits text. Are they kidding? Is there a way to tell that a discrete decimal will have an endless binary equivalent?


What is another word for to convert a code in to a plain text?

A common term for this is to decrypt the text.


Which is larger in size text or binary in c?

Well "text" is four characters, "binary" is six.


What language consists of only two digits 0 and 1?

Binary code represents text using the binary number system's two digits 1 and 0. The code assigns a bit string to each symbol or instruction. Binary is commonly used for encoding data.


How do you convert DAT files to JPEG files?

DAT file are binary files with text. They can be opened in Word. They aren't pictures that can be converted into JPEGs.


Is a set of instructions or statements to the computer?

Computer language, or coding language, can be in a variety of different formats. These 'languages' may include C, C++, C#, Java, Ruby, Python, and others. Many of these languages are converted into binary code (the code that computers actually understand) before they are run. Binary code is not readable by humans, but computer languages are. That is why most people write instructions in a programming languages and then use another program to convert that code into binary.