Click here to Skip to main content
15,900,816 members
Home / Discussions / C#
   

C#

 
AnswerRe: web control browser Pin
OriginalGriff25-Jan-17 2:56
mveOriginalGriff25-Jan-17 2:56 
QuestionMessage Closed Pin
25-Jan-17 1:18
professionalJackson Savitraz25-Jan-17 1:18 
AnswerRe: Fuzzy IndexOf using Bitap Algorithm Pin
OriginalGriff25-Jan-17 1:52
mveOriginalGriff25-Jan-17 1:52 
QuestionAppending data to existing excel file using C# Pin
Member 1296649424-Jan-17 15:34
Member 1296649424-Jan-17 15:34 
AnswerRe: Appending data to existing excel file using C# Pin
Ralf Meier24-Jan-17 22:18
mveRalf Meier24-Jan-17 22:18 
AnswerRe: Appending data to existing excel file using C# Pin
Richard MacCutchan24-Jan-17 22:34
mveRichard MacCutchan24-Jan-17 22:34 
AnswerRe: Appending data to existing excel file using C# Pin
Patrice T25-Jan-17 10:55
mvePatrice T25-Jan-17 10:55 
QuestionAwait - Async not so simple to use? Pin
Richard Andrew x6424-Jan-17 12:24
professionalRichard Andrew x6424-Jan-17 12:24 
AnswerRe: Await - Async not so simple to use? Pin
Nathan Minier24-Jan-17 14:22
professionalNathan Minier24-Jan-17 14:22 
GeneralRe: Await - Async not so simple to use? Pin
Richard Andrew x6425-Jan-17 1:41
professionalRichard Andrew x6425-Jan-17 1:41 
AnswerRe: Await - Async not so simple to use? Pin
Jon McKee24-Jan-17 17:53
professionalJon McKee24-Jan-17 17:53 
GeneralRe: Await - Async not so simple to use? Pin
Richard Andrew x6425-Jan-17 1:42
professionalRichard Andrew x6425-Jan-17 1:42 
SuggestionRe: Await - Async not so simple to use? Pin
Richard Deeming25-Jan-17 3:09
mveRichard Deeming25-Jan-17 3:09 
GeneralRe: Await - Async not so simple to use? Pin
Jon McKee25-Jan-17 9:34
professionalJon McKee25-Jan-17 9:34 
GeneralRe: Await - Async not so simple to use? Pin
Richard Deeming25-Jan-17 10:23
mveRichard Deeming25-Jan-17 10:23 
GeneralRe: Await - Async not so simple to use? Pin
Jon McKee25-Jan-17 10:49
professionalJon McKee25-Jan-17 10:49 
AnswerRe: Await - Async not so simple to use? Pin
Graeme_Grant25-Jan-17 1:31
mvaGraeme_Grant25-Jan-17 1:31 
AnswerRe: Await - Async not so simple to use? Pin
Richard Deeming25-Jan-17 3:12
mveRichard Deeming25-Jan-17 3:12 
GeneralRe: Await - Async not so simple to use? Pin
Richard Andrew x6425-Jan-17 10:08
professionalRichard Andrew x6425-Jan-17 10:08 
QuestionDelegates Pin
Member 1202181724-Jan-17 2:13
Member 1202181724-Jan-17 2:13 
AnswerRe: Delegates Pin
Richard Deeming24-Jan-17 2:20
mveRichard Deeming24-Jan-17 2:20 
AnswerRe: Delegates Pin
OriginalGriff24-Jan-17 2:26
mveOriginalGriff24-Jan-17 2:26 
QuestionPlz Send Me The Simpler Answer to connect with SSIS And SSRS Both In any Version fo the Excell Pin
Member 889223723-Jan-17 23:45
Member 889223723-Jan-17 23:45 
GeneralRe: Plz Send Me The Simpler Answer to connect with SSIS And SSRS Both In any Version fo the Excell Pin
Richard MacCutchan24-Jan-17 0:42
mveRichard MacCutchan24-Jan-17 0:42 
Questionnumber converter Pin
ab_ayo23-Jan-17 1:51
ab_ayo23-Jan-17 1:51 
Why is my code not returning numbers such as 20000, 30000, 40000 etc. it just returns twenty and ignores the thousand.
C#
Console.WriteLine(DateTime.Now);
            Console.WriteLine("Welcome To Ayoola's Number Converter");
            string[] units = new string[] { " ","ONE ", "TWO ", "THREE ", "FOUR ", "FIVE ", "SIX ", "SEVEN ", "EIGHT ", "NINE ", "TEN ", "ELEVEN ", "TWELVE ", "THIRTEEN ", "FOURTEEN ", "FIFTEEN ", "SIXTEEN ", "SEVENTEEN ", "EIGHTEEN ", "NINETEEN " };
            string[] tens = new string[] { " ","TEN ", "TWENTY ", "THIRTY ", "FOURTY ", "FIFTY ", "SIXTY ", "SEVENTY ", "EIGHTY ", "NINETY " };
            string[] big = new string[] { "hundred ", "Thousand ", "million", "billion" };
            long i, num;
            string result = "";
            Console.WriteLine("Enter number here : ");
            String input = Console.ReadLine();
            num = long.Parse(input);
            if (num < 1000000000000 && num > 99999999999)
            {
                i = num / 100000000000;
                result = units[i] + "HUNDRED " + "AND ";
                num = num % 100000000000;
            }
            if (num > 19999999999 && num < 100000000000)
            {
                i = num / 10000000000;
                result += tens[i];
                num = num % 10000000000;
            }
            if (num > 999999999 && num < 20000000000)
            {
                i = num / 1000000000;
                result += units[i] + "BILLION ";
                num = num % 1000000000;
            }
            if (num > 99999999 && num < 1000000000)
            {
                i = num / 100000000;
                result += units[i] + "HUNDRED " + "AND ";
                num = num % 100000000;
            }
            if (num >= 20000000 && num < 100000000)
            {
                i = num / 10000000;
                result += tens[i] ;
                num = num % 10000000;}
            if (num >= 1000000 && num < 20000000)
            {
                i = num / 1000000;
                result += units[i] + "MILLION ";
                num = num % 1000000;
            }
            if (num > 100000 && num < 1000000)
            {
                i = num / 100000;
                result += units[i] + "HUNDRED " + "AND " ;
                num = num % 100000;
            }
            if (num > 19999 && num < 100000)
            {
                i = num / 10000;
                result += tens[i];
                num = num % 10000;
            }
            if (num > 999 && num <= 19999)
            {
                i = num / 1000;
                result += units[i] + "THOUSAND ";
                num = num % 1000;
            }
            if (num > 99 && num < 1000)
            {
                i = num / 100;
                result += units[i] + "HUNDRED " + "AND ";
                num = num % 100;
            }
            if (num > 19 && num < 100)
            {
                i = num / 10;
                result = result + tens[i];
                num = num % 10;
            }
            if (num < 20 && num >= 0)
            { result += units[num]; }
            if (num == 0)
                result += "";
            Console.WriteLine("The number in words: " + result);
            string sample = "1234";

            //int length = sample.Length;

            //for (int k = 0; k < sample.Length; k--)
            //{
                //sample.Substring(0, 3);
               // var seria = sample.Substring(k-3, 3);
                //k = k * 2;
                //int lengthSubString;
                //string subString = sample.Substring(startIndex, lengthSubString);
                //Console.WriteLine("substring  --> " + seria);
            //}
            string s = "1234";
            for (int y = s.Length ; y > 0; y-= 3 )
            {
                if(y-3 > 0)
                {
                    Console.WriteLine(s.Substring(y - 3, 3));
                }    
            }
            Console.WriteLine(sample.Substring(1,3));
            Console.ReadLine();

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.