zoro-zero
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace patial
{
    class Program
    {
        static void Main(string[] args)
        {

            Student s = new Student();
            s.Method2();
            Console.ReadKey();
        }
    }

    public partial class Student 
    {
        private int _age;

        public void Method1()
        {
            Console.WriteLine("method1");
        }
    }


    public partial class Student
    {
        public void Method2()
        {
            ///调用部分类中的私有属性
            _age = 20;
            Console.WriteLine("method2");
            Console.WriteLine(_age);
        }

        
    }
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace patial
{
    class Program
    {
        static void Main(string[] args)
        {

            Student s = new Student();
            s.Method2();
            Console.ReadKey();
        }
    }

    public partial class Student 
    {
        private int _age;

        public void Method1()
        {
            Console.WriteLine("method1");
        }
    }


    public partial class Student
    {
        public void Method2()
        {
            ///调用部分类中的私有属性
            _age = 20;
            Console.WriteLine("method2");
            Console.WriteLine(_age);
        }

        
    }
}

 

分类:

技术点:

相关文章:

  • 2022-01-04
  • 2021-12-13
  • 2022-01-23
  • 2021-09-07
  • 2021-09-30
  • 2022-12-23
猜你喜欢
  • 2021-12-13
  • 2022-12-23
  • 2022-01-13
  • 2022-12-23
  • 2021-11-24
  • 2021-12-13
  • 2022-12-23
相关资源
相似解决方案