Skip to content

Instantly share code, notes, and snippets.

Created September 4, 2013 10:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/6435490 to your computer and use it in GitHub Desktop.
Save anonymous/6435490 to your computer and use it in GitHub Desktop.
// <Name>Static fields should be prefixed with a 's_'</Name>
warnif count > 0 from f in Application.Fields where
!f.NameLike (@"^s_") &&
f.IsStatic &&
!f.IsLiteral &&
!f.IsGeneratedByCompiler &&
!f.IsSpecialName &&
!f.IsEventDelegateObject
select new { f, f.SizeOfInst }
// This naming convention provokes debate.
// Don't hesitate to customize the regex of
// NameLike to your preference.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment