There is no directly way in .net. Please try this workaround:
1. Make a check function with http://msdn.microsoft.com/en-us/library/ff844043.aspx in a profile project.
2. Call this function in your C# project and when it returns true to continue and false to exit application.
3. Sign your C# application.
MSDN Community Support | Feedback to us
Develop and promote your apps in Windows Store
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
Would you like to participate?