Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

C0312 Compiler Error – PB Docs 2021 – PowerBuilder Library

C0312 Compiler Error – PB Docs 2021

C0312 Compiler Error

Message text

An object reference is required for a nonstatic field, method, or
property.

Explanation

To access a nonstatic variable in a .NET class in a conditional
compilation clause, an instance of the class must be created. This example
uses a simple public class Department that is in the .NET assembly
PBInterop.dll. Department has two member variables: public string Name and
public static int ID. In the following example, the attempt to access the
nonstatic variable Name without creating and using an instance of the
Department class generates C0312:

This example deploys without error because an instance of the
Department class is created and used to access the nonstatic
variable:

See Also

C0313 Compiler Error


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x