I heard that NULL is equivalent to .net nullptr and that 0 is not equivalent to .net nullptr. why? I thought that NULL is a macro equal to 0 ?
1
There are 1 best solutions below
Related Questions in .NET
- Does compiler optimize operation on const variable and literal const number?
- What is the point of definnig Asp.net Intrinsic Objects In different places and what is the different betwen them?
- Deleting Orphans with Fluent NHibernate
- IOrderedEnumerable to vb.net IOrderedEnumerable Conversion
- What is this namespace ITypeOfObjectsBoundToListBox ? Couldn't find it
- .net rest service with JSON string and consumed with java client
- What is best way to check if any of the property of object is null or empty?
- Telerik's WPF RadColorPicker NoColorText property not working
- Possible consequences of duplicate ProgId for different classes
- How are multiple requests to Task.Run handled from a resource management standpoint?
- Optimizing C++ call from C#
- Make a per-web-application object available to Web API and SignalR controllers
- System.ComponentModel.DataAnnotations.Schema namespace conflict
- LINQ Except/Distinct based on few columns only, to not add duplicates
- Not displaying content by its URL string - absolute urls
Related Questions in NULL
- Crystal Reports and Null fields
- Comparison of Fixnum with nil failed - palindrome program Ruby
- How to detect null values in a vector
- How do I represent an Optional String in Go?
- How to set a core-data attibute to nil, in Swift?
- getStringExtra returns null value
- Passing Array to method
- Using @NonNull for checking class members too
- What is this line of code asking?
- variable value becomes null unity
- Cannot set property 'innerHTML' of null Javascript validation
- How can I fix this object reference is not set to an instance of an object error?
- Both null and empty char are equal in java
- Distinguish between not set at all AND null?
- PHP - SQL query containing unicode is returning NULL for some reason
Related Questions in NULLPTR
- What is the difference between nullptr and nullptr_t in C++?
- Can I check a C++ iterator against null?
- nullptr not declared in scopt WITH c++11 support
- C++ nullptrt_t as argument in a constructor
- C++11 auto variable initialized by nullptr
- In function call, why doesn't nullptr match a pointer to a template object?
- NULL vs nullptr (Why was it replaced?)
- Why does not std::nullptr_t work with std::cout in C++?
- pointers and .net pointers
- Checking if a pointer in a struct is null
- Can nullptr be used as a variable argument (varargs)?
- Should you always initialize variables with NULL or nullptr?
- using nullptr instead of NULL when mixing C and C++
- Is it safe to #define NULL nullptr?
- Pure virtual functions in C++11
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I depends on if you're talking about unmanaged pointers or managed handles. Regarding pointers, a quote from the documentation here:
The following sample shows that nullptr and zero can be used interchangeably on native pointers.
However, if you're talking about a managed handle, then you can't use 0 as described in this quote from the same page:
You cannot initialize a handle to zero; only nullptr can be used. Assignment of constant 0 to an object handle produces a boxed Int32 and a cast to Object^.