Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
Is there a data type to store 2^256 big integer numbers in variables in C#? As far as I know it exceeds the limit of BigInt.
Assuming that you're talking about exact integers: BigInteger is arbitrarily large. However, it may also be possible to just use a quad of Int64, depending on the exact operations you need to perform.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
Is it possible to implement a threadsafe dictionary with minimal use of locks if the only methods I want are tryget and insert? Entries will never be deleted and value for a key will always stay the same.
Take a look at System.Collections.Concurrent. It contains ConcurrentDictionary<TKey, TValue> which probably does what you're after.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
If yes, please, how many i can use?
An increasing number of threads doesn't necessarily lead to memory leaks. All objects consume some memory though and how many you can instantiate depends on your hardware and whether you are on a 32-bit or 64-bit operating system for example. There is no magic number.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I have a Phone type with two properties: Number and Description (work, home, cell, etc.). I do not know if it should be a class or a struct.
According to MSDN :
AVOID defining a struct unless the type has all of the following characteristics:
It logically represents a single value, similar to primitive types (int, double, etc.).
It has an instance size under 16 bytes.
It is immutable.
It will not have to be boxed frequently.
I am certain it will not be more than 16 bytes, but I am not sure it will meet the other requirements. So which should I use?
When in doubt, use a class. It works better in most cases anyway. structs are for special cases - you'll know when you hit one.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
How does Match 3 developers guarantee that there will always be a possible choice and avoid "No more moves" situations?
A lot of times, they just tend to add in a shuffle feature whenever there are no more moves.
Bejeweled is a good example where, in certain modes, the player only has a certain amount of shuffles, and will lose once there are no more moves or shuffles.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Like the header saiys, what is the maximum value of a “tinyint” field in most database systems? I've heard it may be 240 or 255?
Cheers
What would be the sense of 240?
Tinyint is mostly represented as one byte. In all computers build since the 8 bit byte became standard that is a value of 0-255.