About 2,990,000 results
Open links in new tab
  1. c# - What the difference between nint vs int? - Stack Overflow

    Nov 10, 2021 · I'm curious about the introduction of nint for native-sized integers in C# 9. Could someone provide a detailed comparison between int and nint, focusing on their practical …

  2. .net - What are Native-sized integers in C# 9.0? - Stack Overflow

    Jun 11, 2021 · The first three lines of @Sommmen's link says it all: "Starting in C# 9.0, you can use the nint and nuint keywords to define native-sized integers. These are 32-bit integers …

  3. System.IntPtr and nint in C# Microsoft.CodeAnalysis

    May 20, 2021 · nint is a C# v9 keyword that maps to IntPtr, the type that the runtime understands. Just like int maps to Int32 and string to String, etc. It is indeed not a simple alias like int, they …

  4. c# - How to reinterpret a `ref T*` as a `ref nint`? - Stack Overflow

    Apr 24, 2024 · I have a method which takes in a ref T* and I need to reinterpret it as a ref nint. Normally, I would use ref Unsafe.As<T*, nint> (ref value), but in this case that will not compile …

  5. Stack Overflow

    5 days ago · As nint is an alias for System.IntPtr it is a 32-bit entity on a 32-bit. The pointer size is what we are talking about when discriminating between 32 and 64-bit systems.

  6. Fortran - want to round to one decimal point - Stack Overflow

    Aug 23, 2016 · 3 The `round_x = nint (x*10d0)/10d0' operator rounds x (for abs (x) < 2**31/10, for large numbers use dnint ()) and assigns the rounded value to the round_x variable for further …

  7. How does Fortran convert a real number to Integer

    Aug 25, 2017 · Either use NINT() which is the nearest integer, or INT(). INT() only returns the signed integer part of a number. NINT() works as follows: If a is greater than zero, NINT (a) …

  8. Fortran 77 Real to Int rounding Direction? - Stack Overflow

    Only as completion to the existing answers I want to add an example how the commercial rounds can be realized without using NINT by L = INT(F + 0.5) where L is INTEGER and F is a …

  9. c++ - Convert int to UIntPtr in C# - Stack Overflow

    Oct 17, 2022 · Thanks in advance. In the following piece of simple code, the model.Count is an System.Int32 integer which I get from the a third party library named Xilium.CefGlue (v107). I …

  10. unsafe - Is it possible to reinterpret an object reference as native ...

    Jun 24, 2022 · Disclaimer: I understand this is an unsafe operation and bad practice, I merely want to know if it's possible. Basically, I'm trying to convert an object reference to a nint …