コード例 #1
0
        public void Binary2Decimal()
        {
            string input  = "1001110001000";
            string output = "5000";

            Convertion n      = new Convertion();
            string     actual = n.Binary2Decimal(input);

            Assert.AreEqual(output, actual);
        }
コード例 #2
0
        protected void btnDecimalConvertion_Click(object sender, EventArgs e)
        {
            Convertion n = new Convertion();

            txtDecimal2.Text = n.Binary2Decimal(txtBinary2.Text);
        }