コード例 #1
0
ファイル: GetSet.cs プロジェクト: tbsoft57/ConsoleExamples
        public static void execute()
        {
            char exec = '-';
            if (exec == '+') {
                Console.WriteLine("Exemple d'utilisation Propriété:\r\n");

                newClass nc = new newClass("Prop1 init value");

                Console.WriteLine("Prop1:" + nc.Prop1);
                Console.WriteLine("Prop2:" + nc.Prop2);
                Console.WriteLine("Prop3:" + nc.Prop3);
                Console.WriteLine("Prop4:" + nc.Prop4);

                Console.WriteLine("Prop4 <- ESSAI");
                nc.Prop4 = "ESSAI";
                Console.WriteLine("Prop2:" + nc.Prop2);
                Console.WriteLine("Prop4:" + nc.Prop4);

                Console.WriteLine("Prop4 <- ''");
                nc.Prop4 = "";
                Console.WriteLine("Prop2:" + nc.Prop2);
                Console.WriteLine("Prop4:" + nc.Prop4);

                Console.WriteLine("\r\n");
            }
        }
コード例 #2
0
            static void Main(string[] args)
            {
                newClass a = new newClass();

                Console.WriteLine("hello im Zolboo");
                a.setName("Bold");
                a.print();
            }
コード例 #3
0
    public static void Main(String [] args)
    {
        newClass n = new newClass();

        n.names();

        Console.WriteLine("My Name is " + n.name);
    }
        public static void Find(object obj)
        {
            //   Console.WriteLine("Here");
            newClass o      = (newClass)obj;
            int      search = 3;

            for (int i = o.start; i < o.stop; i++)
            {
                if (intArray[i] == search)
                {
                    Console.Write(i + " ");
                }
            }
        }
コード例 #5
0
        public void newClass_Property()
        {
            var test_instance = new newClass();

            Assert.That(test_instance.TestProperty.Equals("Teststring"));
        }