Click here to Skip to main content
12,298,267 members (51,088 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as

Stats

10.7K views
2 bookmarked
Posted

Converting a nullable object to an integer

, 19 Mar 2011 CPOL

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

19 Mar 2011
AspDotNetDev
Here is a slightly shorter version of your first conversion:object someValue = 1;int result = someValue as int? ?? -1;
16 May 2011
Eduard Keilholz
2 alternatives  
Type conversion

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Jonathan Cardy
Software Developer Repstor Ltd
United Kingdom United Kingdom
I am a Product Architect at Repstor.

Repstor custodian and Repstor Provisioning Engine provide case management and provisioning for SharePoint.

Repstor affinity provides uninterrupted access to content systems, like SharePoint through the familiar interface of Microsoft Outlook.

| | Privacy | Terms of Use | Mobile
Web02 | 2.8.160525.2 | Last Updated 19 Mar 2011
Article Copyright 2011 by Jonathan Cardy
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid