function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
guyr1981guyr1981 

keep getting a compilation error when trying to define enum

Hi,

 

I have a controller for one of my visual force pages and I'm trying to define an enumaration,

but keep getting the following error on compilation:

Error: Compile Error: expecting right curly bracket, found 'Payment' at line 7 column 9

 

This is my class:

 

public class MyController {  

 

 //    public Table_Account__c acct;

    public List<Table_Account__c> TabAccount = new List<Table_Account__c>();         

 

    public enum Account_Types {My Payment, Company Account, General Account}

 

.......

.......

 

Thanks,

Guy

 

imuino2imuino2

Enum elements can not contain spaces try with this

public enum Account_Types {My_Payment, Company_Account, General_Account}

 

Ignacio