Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Compiler Error CS0763

Visual Studio 2008

Both partial method declarations must be static or neither may be static.

A partial method declaration cannot have one part static and the other part not static.

To correct this error

  • Make both parts either static or non-static.

The following code generates CS0763:

// cs0763.cs
using System;

    public partial class C
    {
        static partial void Part();
        partial void Part() // CS0763
        {
        }

        public static int Main()
        {
            return 1;
        }

    }

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.