Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public int isSocialNetworkPresent(ArrayList socialVal, String socialNet_name)
- {
- int id = -1;
- int indexArraylist = 0;
- bool found = false;
- foreach (SocialElement element in socialVal)
- {
- String socialName = element.getSocialName();
- if ((socialName.Equals(socialNet_name)))
- {
- found = true;
- break;
- }
- else { indexArraylist++; }
- }
- if (found)
- {
- return indexArraylist;
- }
- else
- {
- return id;
- }
- }
Add Comment
Please, Sign In to add comment