• raoyijun
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

The following code in other people's development environment is right,but   in my development environment is wrong.Why?

 

  public List<SelectOption> getItems() {
          List<SelectOption> options = new List<SelectOption>();
          options.add(new SelectOption('US','US'));
          options.add(new SelectOption('CANADA','Canada'));
          options.add(new SelectOption('MEXICO','Mexico'));
          return options;
   }

 error:Constructor not defined: [selectOption].<Constructor>(String, String)

 

  

in addition:

  PageReference acctPage = new ApexPages.StandardController(account).view();

error:Illegal assignment from System.PageReference to pageReference

 

what is the difference between  System.PageReference  and pageReference?

 

The following code in other people's development environment is right,but   in my development environment is wrong.Why?

 

  public List<SelectOption> getItems() {
          List<SelectOption> options = new List<SelectOption>();
          options.add(new SelectOption('US','US'));
          options.add(new SelectOption('CANADA','Canada'));
          options.add(new SelectOption('MEXICO','Mexico'));
          return options;
   }

 error:Constructor not defined: [selectOption].<Constructor>(String, String)

 

  

in addition:

  PageReference acctPage = new ApexPages.StandardController(account).view();

error:Illegal assignment from System.PageReference to pageReference

 

what is the difference between  System.PageReference  and pageReference?