milosev.com
  • Home
    • List all categories
    • Sitemap
  • Downloads
    • WebSphere
    • Hitachi902
    • Hospital
    • Kryptonite
    • OCR
    • APK
  • About me
    • Gallery
      • Italy2022
    • Curriculum vitae
      • Resume
      • Lebenslauf
    • Social networks
      • Facebook
      • Twitter
      • LinkedIn
      • Xing
      • GitHub
      • Google Maps
      • Sports tracker
    • Adventures planning
  1. You are here:  
  2. Home
  3. C#
  4. Beginning

IsNullOrEmpty

Details
Written by: Stanko Milosev
Category: Beginning
Published: 11 February 2013
Last Updated: 11 February 2013
Hits: 4221

If varible is string, then to check if it is null use:

if (containerid.IsNullOrEmpty())
{  containerid = "-1"; }

Or String.IsNullOrEmpty()

Because null is not empty...

Unsafe code may only appear if compiling with /unsafe

Details
Written by: Stanko Milosev
Category: Beginning
Published: 16 August 2008
Last Updated: 05 November 2009
Hits: 6711

In VS.NET go to the project property page and in configuration properties>build set Allow Unsafe Code Blocks to True.


Taken from here.