Hi guys ))
Please tell me - how to check that a variable is initialized ?
Thanks in advance )
vedro-compota
33
Posting Whiz
Recommended Answers
Jump to PostIt depends on the type and scope of the variable. Can you be more specific?
Jump to Postint types are always initialized (to zero). You can check if a string type is null (
if (myString == null) { // Not initialized
.In general, a null reference means the variable doesn't have an object.
All 9 Replies
Narue
5,707
Bad Cop
Team Colleague
vedro-compota
commented:
+++
+1
vedro-compota
33
Posting Whiz
Momerath
1,327
Nearly a Senior Poster
Featured Poster
vedro-compota
33
Posting Whiz
Narue
5,707
Bad Cop
Team Colleague
darkagn
315
Veteran Poster
Featured Poster
Farhad.idrees
1
Junior Poster in Training
darkagn
315
Veteran Poster
Featured Poster
vedro-compota
commented:
+++
+1
Farhad.idrees
1
Junior Poster in Training
vedro-compota
commented:
++
+1
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.