Advertisement
OedipusPrime

sick sad world

Jun 4th, 2013
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.55 KB | None | 0 0
  1.         private static string AttributeValue(IEnumerable<ItemAttributeDTO> attributes, string attributeName)
  2.         {
  3.             if (attributes == null || attributeName == null) return string.Empty;
  4.             foreach (var attribute in attributes)
  5.             {
  6.                 if (attribute == null || attribute.AttributeType == null) return null;
  7.                 if (attribute.AttributeType.TypeName == attributeName)
  8.                 {
  9.                     return attribute.Value;
  10.                 }
  11.             }
  12.  
  13.             return null;
  14.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement