Interlock.Add() for double [duplicate]
Asked Answered
M

1

10

.Net framework has Interlocked.Add() methods only for int and long. But I need Interlock.Add() for double type. How can I do that?

Martinson answered 1/7, 2013 at 4:12 Comment(1)
There's none. read discussion here: #1400965Melindamelinde
P
1

It is not possible, which you can read in this question on stackoverflow. It also provides an article about it:

Why is there no overload of Interlocked.Add that accepts Doubles as parameters?

Persist answered 1/7, 2013 at 4:52 Comment(1)
If a question is a duplicate, please post the link as a comment (or, once you have the reputation, vote) rather than in an answer. (Or at least take the effort to write the answer out in your own words :p)Somewhat

© 2022 - 2024 — McMap. All rights reserved.