¡@

Home 

c# Programming Glossary: numbers

decimal vs double! - Which one should I use and when? [duplicate]

http://stackoverflow.com/questions/1165761/decimal-vs-double-which-one-should-i-use-and-when

For money always decimal. It's why it was created. If numbers must add up correctly or balance use decimal. This includes.. any financial storage or calculations scores or other numbers that people might do by hand. If the exact value of numbers.. that people might do by hand. If the exact value of numbers is not important use double for speed. This includes graphics..

Simple 2 way encryption for C#

http://stackoverflow.com/questions/165808/simple-2-way-encryption-for-c-sharp

this code as is All you have to do is change some of the numbers must be 255 in the Key and Vector arrays I left one invalid.. I just lay out all of the byte values in a long string of numbers three per must pad numbers less than 100 . public byte StrToByteArray.. byte values in a long string of numbers three per must pad numbers less than 100 . public byte StrToByteArray string str if str.Length..

Big integers in C#

http://stackoverflow.com/questions/176775/big-integers-in-c-sharp

slow on the order of 10 times slower even for ulong length numbers. Does anyone have any better preferably free libraries or is..

What are the correct version numbers for C#?

http://stackoverflow.com/questions/247621/what-are-the-correct-version-numbers-for-c

are the correct version numbers for C# What are the correct version numbers for C# What came.. version numbers for C# What are the correct version numbers for C# What came out when Why can't I find any answers about..

Randomize a List<T> in C#

http://stackoverflow.com/questions/273313/randomize-a-listt-in-c-sharp

order of a generic list in C# I've got a finite set of 75 numbers in a list I would like to assign a random order to in order.. class Program private static void Main string args var numbers new List int Enumerable.Range 1 75 numbers.Shuffle Console.WriteLine.. string args var numbers new List int Enumerable.Range 1 75 numbers.Shuffle Console.WriteLine The winning numbers are 0 string.Join..

How do I make a textbox that only accepts numbers?

http://stackoverflow.com/questions/463299/how-do-i-make-a-textbox-that-only-accepts-numbers

do I make a textbox that only accepts numbers I have a windows forms app with a textbox control that I want..

How to check if a number is a power of 2

http://stackoverflow.com/questions/600293/how-to-check-if-a-number-is-a-power-of-2

the calculation is done in double s and not in exact numbers private bool IsPowerOfTwo_2 ulong number double log Math.Log.. 011 remember the takes the binary representation of these numbers. So we have 100 4 011 3 Imagine these values being stacked up..

What is the difference between Decimal, Float and Double in C#?

http://stackoverflow.com/questions/618535/what-is-the-difference-between-decimal-float-and-double-in-c

exact results in decimal representations not all decimal numbers are exactly representable in binary floating point 0.1 for example..

How to convert numbers between hexadecimal and decimal in C#?

http://stackoverflow.com/questions/74148/how-to-convert-numbers-between-hexadecimal-and-decimal-in-c

to convert numbers between hexadecimal and decimal in C# How do you convert between.. and decimal in C# How do you convert between hexadecimal numbers and decimal numbers in C# c# hex type conversion decimal .. How do you convert between hexadecimal numbers and decimal numbers in C# c# hex type conversion decimal share improve this question..

Random number generator only generating one random number

http://stackoverflow.com/questions/767999/random-number-generator-only-generating-one-random-number

implementation and we could also start getting the same numbers from different threads which might be a problem and might not...

Random Number Between 2 Double Numbers

http://stackoverflow.com/questions/1064901/random-number-between-2-double-numbers

Number Between 2 Double Numbers It is possible to generate a random number between 2 doubles..

Make big and small numbers human-readable [duplicate]

http://stackoverflow.com/questions/16083666/make-big-and-small-numbers-human-readable

question already has an answer here Formatting Large Numbers with .NET 4 answers I would like to print my very small.. or worse 4µ . The possible answer here Formatting Large Numbers with .NET but adapted for negative log10 is truncating the numbers..

What is a regular expression for parsing out individual sentences?

http://stackoverflow.com/questions/1936388/what-is-a-regular-expression-for-parsing-out-individual-sentences

because I use I.D. Newlines should also be accepted. Numbers should not cause sentence breaks like 1.23. This is proving.. because I use I.D. Newlines should also be accepted. Numbers should not cause sentence breaks like 1.23. Regex rx new Regex.. because I use I.D. Newlines should also be accepted. Numbers should not cause sentence breaks like 1.23. For complicated..

C# Exceptions Not Giving Line Numbers

http://stackoverflow.com/questions/2191957/c-sharp-exceptions-not-giving-line-numbers

Exceptions Not Giving Line Numbers I am using C# having come from a Java background I have an..

How can a separator be added between items in an ItemsControl

http://stackoverflow.com/questions/2511227/how-can-a-separator-be-added-between-items-in-an-itemscontrol

improve this question ItemsControl ItemsSource Binding Numbers ItemsControl.ItemsPanel could use a WrapPanel if more appropriate..

Subset sum problem

http://stackoverflow.com/questions/2708436/subset-sum-problem

j decimal tempPrice decimal alNewPrice j decimal tempNumbers decimal alNewHowMuch j if id tempid tempPrice price alTemp.Add.. if id tempid tempPrice price alTemp.Add j sum sum tempNumbers if sum number for int j alTemp.Count 1 j 0 j int tempIndex.. Array depending on Transaction Type Transaction ID and Numbers. I'm adding numbers to ArrayList like 156 340 when it is TransferIn..

Best way to limit textbox decimal input in c#

http://stackoverflow.com/questions/3125463/best-way-to-limit-textbox-decimal-input-in-c-sharp

TextBoxFilter Flags public enum Filters None 0 Text 1 Numbers 2 AlphaNumeric Filters.Text Filters.Numbers Currency 4 All Filters.Text.. None 0 Text 1 Numbers 2 AlphaNumeric Filters.Text Filters.Numbers Currency 4 All Filters.Text Filters.Numbers Filters.Currency.. Filters.Numbers Currency 4 All Filters.Text Filters.Numbers Filters.Currency Dictionary TextBox Filters _keyFilter Dictionary..

Details of Assembly version

http://stackoverflow.com/questions/3387108/details-of-assembly-version

all the values or you can default the Build and Revision Numbers by using the ' ' as shown below assembly AssemblyVersion 1.0... all the values or you can default the Build and Revision Numbers by using the ' ' as shown below assembly AssemblyVersion 1.0...

Performance Tests of Serializations used by WCF Bindings

http://stackoverflow.com/questions/3790728/performance-tests-of-serializations-used-by-wcf-bindings

250 so I conclude protobuf net v2 the winner... Numbers updated with .NET 4.5 and current library builds on a newer..

WPF loading animation on a separate UI thread? (C#)

http://stackoverflow.com/questions/3806535/wpf-loading-animation-on-a-separate-ui-thread-c

is created in the DoWork handler because the global mNumbers collection is on the UI thread and can't interact in the DoWork.. in the DoWork handler. XAML Button x Name btnGenerateNumbers Grid.Row 1 HorizontalAlignment Center VerticalAlignment Center.. Center VerticalAlignment Center Content Generate Numbers C# Code Behind BackgroundWorker bgWorker new BackgroundWorker..

Proper Use of yield return

http://stackoverflow.com/questions/410026/proper-use-of-yield-return

represents an infinite set. Consider the list of Prime Numbers or an infinite list of random numbers. You can never return..

C# HtmlEncode - ISO-8859-1 Entity Names vs Numbers

http://stackoverflow.com/questions/4853920/c-sharp-htmlencode-iso-8859-1-entity-names-vs-numbers

HtmlEncode ISO 8859 1 Entity Names vs Numbers According to the following table for the ISO 8859 1 standard..

How to enumerate the LOCALIZED alphabet in C#?

http://stackoverflow.com/questions/5676692/how-to-enumerate-the-localized-alphabet-in-c

New UnicodeRangeInfo 101 H10100 H1013F Aegean Numbers AllRanges.Add New UnicodeRangeInfo 102 H10140 H1018F Ancient.. New UnicodeRangeInfo 102 H10140 H1018F Ancient Greek Numbers AllRanges.Add New UnicodeRangeInfo 103 H10380 H1039F Ugaritic.. New UnicodeRangeInfo 110 H12400 H1247F Cuneiform Numbers and Punctuation AllRanges.Add New UnicodeRangeInfo 111 H1D360..

Implementing Box-Mueller random number generator in C#

http://stackoverflow.com/questions/5817490/implementing-box-mueller-random-number-generator-in-c-sharp

The Box Muller Method for Generating Gaussian Random Numbers says that the code should look like this this is not C# #include..

Formatting Numbers by padding with leading zeros in SQL Server

http://stackoverflow.com/questions/9520661/formatting-numbers-by-padding-with-leading-zeros-in-sql-server

Numbers by padding with leading zeros in SQL Server We have an old..