You need to sign in to do that
Don't have an account?
Sanjat Samal 8
How can I compare a string with a set ?
I Need to compare in IF condition but the one is "String" and another is a "Set". Please suggest
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
All Answers
Loop over the Set of values and inside for loop compare your String value.
Example:
Set<ID> setIds = New Set<ID>();
String str = 'value';
for(ID ids : setIds){
if(ids == str){
// your logic
}
}
Thanks,
Ram