Code Snippet for Properties with Prefix Notation
As I wrote in previous blog posts, I still use prefix notation for private members, one reason being IntelliSense. If you’re like me, you may find these code snippets handy:
| Name: | Boolean Property |
| Description: | Code snippets for a boolean property. |
| Shortcut: | bp |
| Result: | private bool m_bMyProperty; public bool MyProperty { get { return m_bMyProperty;} set { m_bMyProperty = value;} }
|
|
| Name: | Integer Property |
| Description: | Code snippets for an integer property. |
| Shortcut: | ip |
| Result: | private int m_nMyProperty; public int MyProperty { get { return m_nMyProperty;} set { m_nMyProperty = value;} }
|
|
| Name: | Enum Property |
| Description: | Code snippets for an enum property. |
| Shortcut: | ep |
| Result: | private TheType m_eTheName; public TheType TheName { get { return m_eTheName; } set { m_eTheName = value; } } |
|
| Name: | Object Property |
| Description: | Code snippets for an object property. |
| Shortcut: | op |
| Result: | private TheType m_objTheName; public TheType TheName { get { return m_objTheName;} set { m_objTheName = value;} }
|
| | |
| Download: | Properties.snippet |