MyList.clear();
Where MyList is a List variable.
Example:
List<Account> MyList = new List<Account>();
MyList.add(new Account(name = 'test');
MyList.clear(); // Removes the accounts
Cheers!!!
MyList.clear();
Where MyList is a List variable.
Example:
List<Account> MyList = new List<Account>();
MyList.add(new Account(name = 'test');
MyList.clear(); // Removes the accounts
Cheers!!!