I have question about c# partial method. How to use(call from main) partial methods if they are private by default?
using System;
namespace SecondProject
{
internal class Program
{
partial class Person
{
partial void foo();
}
partial class Person
{
partial void foo() => Console.WriteLine("foo");
}
static void Main(string[] args)
{
Person person = new Person();
person.foo(); // person.foo() is inaccessible due to its protection level
}
}
}