I was recently looking at wrapper classes and googled the following page...http://wiki.developerforce.com/page/Wrapper_Class
While I understood wrapper classes, I was baffled by the following...
public List<cContact> getContacts() {
if(contactList == null) {
contactList = new List<cContact>();
for(Contact c: [select Id, Name, Email, Phone from Contact limit 10]) {
// As each contact is processed we create a new cContact object and add it to the contactList
contactList.add(new cContact(c));
}
}
return contactList;
}
and in particular...
for(Contact c: [select Id, Name, Email, Phone from Contact limit 10]) { ... }
What is that select and from? Where can I look at more info for this in the foreach?
I know about LINQ and the select, from, where, etc.... but I never seen _this_ syntax before. What is it and how do I research more about this syntax?
SOQL(Salesforce Object Query Language)
– Riant