简体   繁体   中英

What is this C# structure

I have come across the following code and am not sure what it means?

public class Countries
{
    public Countries();

    public static bool AllowInvoice(string pCountryCode);
    public static bool IsPostcodeMandatory(string pCountryCode);
}

This code is then called in the following way:

Contact.IncludePostCode = Countries.IsPostcodeMandatory(countryCode);

It seems to me that this is an interface? Where the method is being defined, but the body is being written elsewhere?

If this is the case, I would expect that when I search the whole project, I would find the code for the body of the method, but I do not find it anywhere?

Any suggestions?

This class is defined in a referenced assembly, Visual Studio is showing you the class's metadata.

What you see here are just the method signatures, not their implementation. This code would not compile.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM