NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Compiler Error CS0119

'construct1_name' denotes a 'construct1' which is not valid in the given context

The compiler detected an unexpected construct. For example:

The following sample generates CS0119:

namespace a {
   public class z {
      public z() {
      }
      public static void Main() {
         (z()) ? 0 : 1;  // CS0119, cannot use constructor in a conditional
         // the following line is a more acceptable conditional statement
         // 1 < 2 ? 0 : 1; 
      }
   }
}