Guest User

Untitled

a guest
Sep 21st, 2011
234
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private Double? GetElementLength(Element element)
  2. {
  3.     var lengthParam = Enum.GetValues(typeof (BuiltInParameter))
  4.                 .OfType<BuiltInParameter>()
  5.                 .Where(p => p.ToString().Contains("LENGTH"))
  6.                 .Select(param => element.get_Parameter(param))                
  7.                 .Where(param => param != null)
  8.                 .FirstOrDefault();
  9.  
  10.             if (lengthParam != null)
  11.             {
  12.                 var lengthValue = lengthParam.AsDouble();
  13.                 return lengthValue;
  14.             }
  15.  
  16.             return null;
  17. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×