JSRUN 用代码说话
using System;

public class HelloWorld
{
    public static void Main()
    {
       //JSRUN引擎2.0,支持多达30种语言在线运行,全仿真在线交互输入输出。
        Console.WriteLine("HELLO JSRUN     - from C# ");
        string a = Console.ReadLine();
        Console.HelloWorld(a);
    }
}
yyyxb(吹弹可破) - 2020-09-16 0 人
AAAAA
using System;
using System.Linq;
using System.Text;

public class HelloWorld
{
    public static void Main()
    {
       //JSRUN引擎2.0,支持多达30种语言在线运行,全仿真在线交互输入输出。
        Console.WriteLine("HELLO JSRUN     - from C# ");
        byte[] resp5 = {170,170,170,150,105,5,8,0,0,144,1,0,4,0,104,84,105,109,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,49,0,48,0,49,0,49,0,57,0,57,0,50,0,48,0,54,0,49,0,49,0,102,107,73,108,2,94,95,108,184,92,58,83,227,137,62,101,39,89,83,144,50,0,48,0,53,0,54,0,247,83,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,52,0,50,0,57,0,48,0,48,0,49,0,49,0,57,0,57,0,50,0,48,0,54,0,49,0,49,0,54,0,52,0,55,0,54,0,102,107,73,108,2,94,108,81,137,91,64,92,95,108,184,92,6,82,64,92,32,0,32,0,32,0,32,0,32,0,50,0,48,0,49,0,57,0,48,0,55,0,48,0,51,0,50,0,48,0,51,0,57,0,48,0,55,0,48,0,51,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,87,76,102,0,126,0,50,0,0,255,133,27,81,81,81,62,113,13,213,100,243,60,117,175,204,246,167,95,176,60,67,164,90,171,218,154,11,122,10,83,154,159,169,173,27,137,89,17,205,229,111,89,62,161,170,221,75,234,12,80,156,212,241,38,24,48,68,0,235,139,177,95,3,44,198,3,199,132,252,12,116,190,254,160,9,123,7,81,174,216,82,81,81,90,62,139,101,214,10,61,178,170,200,110,107,124,109,216,140,123,37,240,61,246,243,150,131,203,185,215,100,177,230,126,17,226,43,50,126,236,238,106,242,224,16,185,153,202,201,221,214,91,12,243,145,214,19,225,235,7,155,10,135,123,212,160,237,51,116,138,51,99,198,214,185,246,247,125,62,198,113,50,221,5,169,176,188,109,117,11,147,223,53,182,60,200,223,114,126,230,104,14,115,40,75,227,36,217,60,214,160,107,12,106,82,47,142,70,235,132,84,91,187,62,192,7,123,255,59,244,21,2,30,135,187,188,122,26,239,120,32,39,241,43,52,238,57,145,108,229,246,12,37,184,54,193,29,248,202,89,249,51,101,212,157,170,94,31,83,72,166,211,155,100,169,65,6,70,197,248,152,227,226,167,182,140,47,87,203,173,9,244,237,107,142,112,102,13,135,32,169,176,243,212,60,166,227,33,242,129,139,51,198,107,9,94,33,136,149,76,82,214,52,147,82,162,43,164,2,179,10,75,210,115,140,45,225,211,213,243,100,128,0,220,92,15,1,62,212,151,183,18,199,87,94,192,231,224,91,127,95,86,13,162,20,237,17,19,139,191,27,130,61,56,252,114,153,154,211,32,185,225,61,62,162,171,15,12,6,75,67,171,119,231,221,52,49,112,57,90,74,238,152,141,115,22,117,4,187,72,154,189,67,49,117,37,46,152,56,246,225,242,162,219,238,109,62,249,77,149,86,43,113,239,89,164,212,155,1,70,20,89,180,249,248,150,185,120,19,27,163,220,221,230,8,68,169,88,137,191,254,215,86,17,33,177,91,179,4,28,100,39,41,21,80,30,231,204,240,40,136,76,41,163,20,251,182,1,219,16,119,113,107,124,111,198,190,170,54,226,159,110,91,253,32,134,241,182,145,108,55,132,74,151,30,171,191,112,147,209,11,246,117,82,145,195,170,186,127,70,247,10,28,141,254,81,87,86,186,67,38,157,210,61,67,30,9,166,173,43,153,116,80,67,20,95,183,81,102,182,204,80,170,129,31,237,230,181,173,97,51,104,11,57,160,208,161,29,228,95,103,133,47,2,150,76,141,161,246,161,80,155,116,141,36,137,219,142,203,0,221,35,235,209,184,92,246,249,65,103,230,128,11,193,100,170,233,164,37,153,54,64,106,219,163,207,128,191,222,200,233,220,24,120,131,224,51,182,234,33,174,81,242,205,1,99,45,35,12,102,61,140,161,90,79,63,48,219,86,145,188,83,136,21,81,163,133,250,0,172,89,225,46,54,219,27,238,254,47,172,142,222,186,214,233,109,32,112,101,118,254,48,41,247,71,117,224,135,140,18,20,205,98,255,216,63,102,48,134,238,20,207,224,220,201,205,68,31,75,102,233,161,224,66,117,31,4,38,189,28,7,190,106,203,57,57,36,244,27,48,252,217,236,222,115,0,35,100,250,11,195,239,9,109,12,113,82,251,160,201,130,191,127,126,3,10,48,219,168,171,239,161,131,41,250,70,172,55,226,139,17,176,124,229,216,0,72,154,32,187,205,79,13,248,206,149,230,234,67,77,60,252,254,188,81,15,7,114,87,228,64,246,11,148,49,183,240,76,188,214,252,98,3,73,63,170,25,156,162,205,158,128,233,32,235,82,124,110,49,164,81,73,107,93,189,28,39,2,82,30,215,71,166,23,3,166,46,203,19,221,59,139,223,72,43,126,175,248,210,47,31,110,248,224,129,84,91,215,90,62,229,97,228,231,170,11,250,14,165,212,213,171,148,22,143,224,245,152,125,185,208,18,200,38,255,20,137,143,151,221,48,51,21,75,208,210,214,64,183,50,149,193,227,240,125,52,92,242,56,70,25,117,156,251,10,202,171,199,59,59,27,68,151,251,61,235,132,46,88,76,227,16,90,17,124,25,130,42,65,124,90,62,1,151,243,95,204,83,253,151,128,131,216,68,95,193,149,188,160,244,254,64,156,182,43,254,251,142,212,108,123,134,191,226,33,219,15,77,130,206,35,182,2,46,218,180,193,67,56,184,29,78,42,195,244,53,156,246,10,249};
                    // object card = Object{name="",sex="",nation="",birthday="", address="", number=""};
                    byte[] nameBytes = resp5.Skip(14).Take(30).ToArray();
                    string name = Encoding.Unicode.GetString(nameBytes).Trim();
        Console.WriteLine(name);
                    byte[] sexBytes = resp5.Skip(44).Take(2).ToArray();
                    string s = Encoding.Unicode.GetString(sexBytes).Trim();
                    string sex = "";
                    switch (s)
                    {
                       case "1":
                           sex = "男";
                           break;
                       case "2":
                           sex = "女";
                           break;
                       case "9":
                           sex = "其它";
                           break;
                       default:
                           sex = "未知";
                           break;
                    }
        Console.WriteLine(sex);
                    byte[] nationBytes = resp5.Skip(46).Take(4).ToArray();
                    string nation = Encoding.Unicode.GetString(nationBytes).Trim();
        Console.WriteLine(nation);
                    byte[] birthdayBytes = resp5.Skip(50).Take(16).ToArray();
                    string temp = Encoding.Unicode.GetString(birthdayBytes).Trim();
                    string birthday = temp.Substring(0, 4) + "-" + temp.Substring(4, 2) + "-" + temp.Substring(6, 2);
        Console.WriteLine(birthday);
                    byte[] addressBytes = resp5.Skip(66).Take(70).ToArray();
                    string address = Encoding.Unicode.GetString(addressBytes).Trim();
        Console.WriteLine(address);
                    byte[] numberBytes = resp5.Skip(136).Take(36).ToArray();
                    string number = Encoding.Unicode.GetString(numberBytes).Trim();
        Console.WriteLine(number);

    }
}
mybeeleven(MaybeEleven) - 2020-09-11 0 人
获取身份证信息
using System;
using System.Linq;
using System.Text;

public class HelloWorld
{
    public static void Main()
    {
       //JSRUN引擎2.0,支持多达30种语言在线运行,全仿真在线交互输入输出。
        Console.WriteLine("HELLO JSRUN     - from C# ");
        byte[] resp5 = {170,170,170,150,105,5,8,0,0,144,1,0,4,0,104,84,105,109,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,49,0,48,0,49,0,49,0,57,0,57,0,50,0,48,0,54,0,49,0,49,0,102,107,73,108,2,94,95,108,184,92,58,83,227,137,62,101,39,89,83,144,50,0,48,0,53,0,54,0,247,83,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,52,0,50,0,57,0,48,0,48,0,49,0,49,0,57,0,57,0,50,0,48,0,54,0,49,0,49,0,54,0,52,0,55,0,54,0,102,107,73,108,2,94,108,81,137,91,64,92,95,108,184,92,6,82,64,92,32,0,32,0,32,0,32,0,32,0,50,0,48,0,49,0,57,0,48,0,55,0,48,0,51,0,50,0,48,0,51,0,57,0,48,0,55,0,48,0,51,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,32,0,87,76,102,0,126,0,50,0,0,255,133,27,81,81,81,62,113,13,213,100,243,60,117,175,204,246,167,95,176,60,67,164,90,171,218,154,11,122,10,83,154,159,169,173,27,137,89,17,205,229,111,89,62,161,170,221,75,234,12,80,156,212,241,38,24,48,68,0,235,139,177,95,3,44,198,3,199,132,252,12,116,190,254,160,9,123,7,81,174,216,82,81,81,90,62,139,101,214,10,61,178,170,200,110,107,124,109,216,140,123,37,240,61,246,243,150,131,203,185,215,100,177,230,126,17,226,43,50,126,236,238,106,242,224,16,185,153,202,201,221,214,91,12,243,145,214,19,225,235,7,155,10,135,123,212,160,237,51,116,138,51,99,198,214,185,246,247,125,62,198,113,50,221,5,169,176,188,109,117,11,147,223,53,182,60,200,223,114,126,230,104,14,115,40,75,227,36,217,60,214,160,107,12,106,82,47,142,70,235,132,84,91,187,62,192,7,123,255,59,244,21,2,30,135,187,188,122,26,239,120,32,39,241,43,52,238,57,145,108,229,246,12,37,184,54,193,29,248,202,89,249,51,101,212,157,170,94,31,83,72,166,211,155,100,169,65,6,70,197,248,152,227,226,167,182,140,47,87,203,173,9,244,237,107,142,112,102,13,135,32,169,176,243,212,60,166,227,33,242,129,139,51,198,107,9,94,33,136,149,76,82,214,52,147,82,162,43,164,2,179,10,75,210,115,140,45,225,211,213,243,100,128,0,220,92,15,1,62,212,151,183,18,199,87,94,192,231,224,91,127,95,86,13,162,20,237,17,19,139,191,27,130,61,56,252,114,153,154,211,32,185,225,61,62,162,171,15,12,6,75,67,171,119,231,221,52,49,112,57,90,74,238,152,141,115,22,117,4,187,72,154,189,67,49,117,37,46,152,56,246,225,242,162,219,238,109,62,249,77,149,86,43,113,239,89,164,212,155,1,70,20,89,180,249,248,150,185,120,19,27,163,220,221,230,8,68,169,88,137,191,254,215,86,17,33,177,91,179,4,28,100,39,41,21,80,30,231,204,240,40,136,76,41,163,20,251,182,1,219,16,119,113,107,124,111,198,190,170,54,226,159,110,91,253,32,134,241,182,145,108,55,132,74,151,30,171,191,112,147,209,11,246,117,82,145,195,170,186,127,70,247,10,28,141,254,81,87,86,186,67,38,157,210,61,67,30,9,166,173,43,153,116,80,67,20,95,183,81,102,182,204,80,170,129,31,237,230,181,173,97,51,104,11,57,160,208,161,29,228,95,103,133,47,2,150,76,141,161,246,161,80,155,116,141,36,137,219,142,203,0,221,35,235,209,184,92,246,249,65,103,230,128,11,193,100,170,233,164,37,153,54,64,106,219,163,207,128,191,222,200,233,220,24,120,131,224,51,182,234,33,174,81,242,205,1,99,45,35,12,102,61,140,161,90,79,63,48,219,86,145,188,83,136,21,81,163,133,250,0,172,89,225,46,54,219,27,238,254,47,172,142,222,186,214,233,109,32,112,101,118,254,48,41,247,71,117,224,135,140,18,20,205,98,255,216,63,102,48,134,238,20,207,224,220,201,205,68,31,75,102,233,161,224,66,117,31,4,38,189,28,7,190,106,203,57,57,36,244,27,48,252,217,236,222,115,0,35,100,250,11,195,239,9,109,12,113,82,251,160,201,130,191,127,126,3,10,48,219,168,171,239,161,131,41,250,70,172,55,226,139,17,176,124,229,216,0,72,154,32,187,205,79,13,248,206,149,230,234,67,77,60,252,254,188,81,15,7,114,87,228,64,246,11,148,49,183,240,76,188,214,252,98,3,73,63,170,25,156,162,205,158,128,233,32,235,82,124,110,49,164,81,73,107,93,189,28,39,2,82,30,215,71,166,23,3,166,46,203,19,221,59,139,223,72,43,126,175,248,210,47,31,110,248,224,129,84,91,215,90,62,229,97,228,231,170,11,250,14,165,212,213,171,148,22,143,224,245,152,125,185,208,18,200,38,255,20,137,143,151,221,48,51,21,75,208,210,214,64,183,50,149,193,227,240,125,52,92,242,56,70,25,117,156,251,10,202,171,199,59,59,27,68,151,251,61,235,132,46,88,76,227,16,90,17,124,25,130,42,65,124,90,62,1,151,243,95,204,83,253,151,128,131,216,68,95,193,149,188,160,244,254,64,156,182,43,254,251,142,212,108,123,134,191,226,33,219,15,77,130,206,35,182,2,46,218,180,193,67,56,184,29,78,42,195,244,53,156,246,10,249};
                    // object card = Object{name="",sex="",nation="",birthday="", address="", number=""};
                    byte[] nameBytes = resp5.Skip(14).Take(30).ToArray();
                    string name = Encoding.Unicode.GetString(nameBytes).Trim();
        Console.WriteLine(name);
                    byte[] sexBytes = resp5.Skip(44).Take(2).ToArray();
                    string s = Encoding.Unicode.GetString(sexBytes).Trim();
                    string sex = "";
                    switch (s)
                    {
                       case "1":
                           sex = "男";
                           break;
                       case "2":
                           sex = "女";
                           break;
                       case "9":
                           sex = "其它";
                           break;
                       default:
                           sex = "未知";
                           break;
                    }
        Console.WriteLine(sex);
                    byte[] nationBytes = resp5.Skip(46).Take(4).ToArray();
                    string nation = Encoding.Unicode.GetString(nationBytes).Trim();
        Console.WriteLine(nation);
                    byte[] birthdayBytes = resp5.Skip(50).Take(16).ToArray();
                    string temp = Encoding.Unicode.GetString(birthdayBytes).Trim();
                    string birthday = temp.Substring(0, 4) + "-" + temp.Substring(4, 2) + "-" + temp.Substring(6, 2);
        Console.WriteLine(birthday);
                    byte[] addressBytes = resp5.Skip(66).Take(70).ToArray();
                    string address = Encoding.Unicode.GetString(addressBytes).Trim();
        Console.WriteLine(address);
                    byte[] numberBytes = resp5.Skip(136).Take(36).ToArray();
                    string number = Encoding.Unicode.GetString(numberBytes).Trim();
        Console.WriteLine(number);

    }
}
shiwan66(前端大神) - 2020-08-26 0 人
获取身份证信息
using System;
using System.Text;
struct Books
{
    public string title;
    public string Content;
    public double Len;
    public bool flag;
    public void display() 
    {
        Console.WriteLine(title);
        Console.WriteLine(Content);
        Console.WriteLine(Len);
        Console.WriteLine(flag);
    }
    public void getValues(string title1, string content1, double len1, bool flag1)
    {
        title = title1;
        Content = content1;
        Len = len1;
        flag = flag1;
    }
}
public class HelloWorld
{
    public static void Main()
    {
        Console.WriteLine("HELLO JSRUN     - from C# ");
        Books Js = new Books();
        Js.getValues("你不知道的JavaScript", "原型、this", 300D, true);
        Js.display();
    }
}
qijigzs(前端大神) - 2020-08-19 0 人
C# 结构体学习
using System;
using System.Collections.Generic;
using System.Text;

namespace FactoryMethod
{
    /// <summary>dd
    /// 运算类
    /// </summary>
    class Operation
    {
        private double _numberA = 0;
        private double _numberB = 0;

        public double NumberA
        {
            get { return _numberA; }
            set { _numberA = value; }
        }

        public double NumberB
        {
            get { return _numberB; }
            set { _numberB = value; }
        }

        /// <summary>
        /// 得到运算结果
        /// </summary>
        /// <returns></returns>
        public virtual double GetResult()
        {
            double result = 0;
            return result;
        }
    }

    /// <summary>
    /// 加法类
    /// </summary>
    class OperationAdd : Operation
    {
        public override double GetResult()
        {
            double result = 0;
            result = NumberA + NumberB;
            return result;
        }
    }

    /// <summary>
    /// 减法类
    /// </summary>
    class OperationSub : Operation
    {
        public override double GetResult()
        {
            double result = 0;
            result = NumberA - NumberB;
            return result;
        }
    }
    /// <summary>
    /// 乘法类
    /// </summary>
    class OperationMul : Operation
    {
        public override double GetResult()
        {
            double result = 0;
            result = NumberA * NumberB;
            return result;
        }
    }
    /// <summary>
    /// 除法类
    /// </summary>
    class OperationDiv : Operation
    {
        public override double GetResult()
        {
            double result = 0;
            if (NumberB == 0)
                throw new Exception("除数不能为0。");
            result = NumberA / NumberB;
            return result;
        }
    }

    /// <summary>
    /// 工厂方法
    /// </summary>
    interface IFactory
    {
        Operation CreateOperation();
    }

    /// <summary>
    /// 专门负责生产“+”的工厂
    /// </summary>
    class AddFactory : IFactory
    {
        public Operation CreateOperation()
        {
            return new OperationAdd();
        }
    }

    /// <summary>
    /// 专门负责生产“-”的工厂
    /// </summary>
    class SubFactory : IFactory
    {
        public Operation CreateOperation()
        {
            return new OperationSub();
        }
    }

    /// <summary>
    /// 专门负责生产“*”的工厂
    /// </summary>
    class MulFactory : IFactory
    {
        public Operation CreateOperation()
        {
            return new OperationMul();
        }
    }

    /// <summary>
    /// 专门负责生产“/”的工厂
    /// </summary>
    class DivFactory : IFactory
    {
        public Operation CreateOperation()
        {
            return new OperationDiv();
        }
    }

}
9964a(小浩) - 2020-08-06 0 人
FactoryMethod
using System;
using System.Collections.Generic;
using System.Text;

namespace FactoryMethod
{
    /// <summary>dd
    /// 运算类
    /// </summary>
    class Operation
    {
        private double _numberA = 0;
        private double _numberB = 0;

        public double NumberA
        {
            get { return _numberA; }
            set { _numberA = value; }
        }

        public double NumberB
        {
            get { return _numberB; }
            set { _numberB = value; }
        }

        /// <summary>
        /// 得到运算结果
        /// </summary>
        /// <returns></returns>
        public virtual double GetResult()
        {
            double result = 0;
            return result;
        }
    }

    /// <summary>
    /// 加法类
    /// </summary>
    class OperationAdd : Operation
    {
        public override double GetResult()
        {
            double result = 0;
            result = NumberA + NumberB;
            return result;
        }
    }

    /// <summary>
    /// 减法类
    /// </summary>
    class OperationSub : Operation
    {
        public override double GetResult()
        {
            double result = 0;
            result = NumberA - NumberB;
            return result;
        }
    }
    /// <summary>
    /// 乘法类
    /// </summary>
    class OperationMul : Operation
    {
        public override double GetResult()
        {
            double result = 0;
            result = NumberA * NumberB;
            return result;
        }
    }
    /// <summary>
    /// 除法类
    /// </summary>
    class OperationDiv : Operation
    {
        public override double GetResult()
        {
            double result = 0;
            if (NumberB == 0)
                throw new Exception("除数不能为0。");
            result = NumberA / NumberB;
            return result;
        }
    }

    /// <summary>
    /// 工厂方法
    /// </summary>
    interface IFactory
    {
        Operation CreateOperation();
    }

    /// <summary>
    /// 专门负责生产“+”的工厂
    /// </summary>
    class AddFactory : IFactory
    {
        public Operation CreateOperation()
        {
            return new OperationAdd();
        }
    }

    /// <summary>
    /// 专门负责生产“-”的工厂
    /// </summary>
    class SubFactory : IFactory
    {
        public Operation CreateOperation()
        {
            return new OperationSub();
        }
    }

    /// <summary>
    /// 专门负责生产“*”的工厂
    /// </summary>
    class MulFactory : IFactory
    {
        public Operation CreateOperation()
        {
            return new OperationMul();
        }
    }

    /// <summary>
    /// 专门负责生产“/”的工厂
    /// </summary>
    class DivFactory : IFactory
    {
        public Operation CreateOperation()
        {
            return new OperationDiv();
        }
    }

}
9964a(小浩) - 2020-08-06 0 人
FactoryMethod
没有了
1/5 下一页