Advertisement
LostProphet

SettingsFileExtensions

Sep 14th, 2013
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.40 KB | None | 0 0
  1. public static class SettingsFileExtensions
  2. {
  3.     public static bool DoesCategoryExist(this SettingsFile settings, string inputCategory)
  4.     {
  5.         string[] categories = settings.GetCategoryNames();
  6.  
  7.         foreach (string category in categories)
  8.         {
  9.             if (category.ToLower() == inputCategory.ToLower())
  10.                 return true;
  11.         }
  12.  
  13.         return false;
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement