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?

user
  • 5,335
  • 7
  • 47
  • 63
  • There's none. read discussion here: http://stackoverflow.com/questions/1400465/why-is-there-no-overload-of-interlocked-add-that-accepts-doubles-as-parameters – RAS Jul 01 '13 at 04:19

1 Answers1

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?

Community
  • 1
  • 1
ian
  • 193
  • 2
  • 10
  • 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) – Rawling Jul 01 '13 at 09:38