Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

binary addition c#

public class Solution
{
    public string AddBinary(string a, string b) 
    {
        int number_one = Convert.ToInt32(a, 2);
        int number_two = Convert.ToInt32(b, 2);

        return Convert.ToString(number_one + number_two, 2);
    }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# string .contains against empty string returns 
Csharp :: ms transform 
Csharp :: you have the following c# code. stringbuilder sb = new stringbuilder(really long string); the really long string variable is a string in which a very long string is stored. 
Csharp :: c# return error status code based on exception 
Csharp :: resize image and add watermark c# 
Csharp :: how to convert command line argument to int in C# 
Csharp :: compare 0001/01/01 in c# 
Csharp :: How to put a (new line) inside a list box 
Csharp :: c# extend array 
Csharp :: leantween unity when timescale 0 
Csharp :: JAJAAJAJAJ 
Csharp :: unity organize variables in inspector 
Csharp :: C# replace all . except last one 
Csharp :: c# boolean 
Csharp :: membership get user id 
Csharp :: change color unity back and forth 
Csharp :: c# class responsible for creating instances 
Csharp :: getcomponent 
Csharp :: nullable IList 
Csharp :: Transparent UserControl 
Csharp :: hacking 
Csharp :: linq cross join 
Csharp :: unity button text changes when clicked 
Csharp :: entity framework attach 
Csharp :: how to play a random sound at the position that you want in unity 
Csharp :: stringbuilder sb = new stringbuilder(reallylongstring); you need to identify whether a string stored in an object named stringtofind is within the stringbuilder sb object. 
Csharp :: find first occurrence of character in string 
Csharp :: .net 6 get appsettings value 
Csharp :: Insertion sort in c# 
Csharp :: belgiumcampus 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =