Click here to Skip to main content
15,559,619 members
Home / Discussions / C#
   

C#

 
GeneralRe: Linq To SQL Join Question Pin
Nathan Minier10-Aug-21 6:46
professionalNathan Minier10-Aug-21 6:46 
QuestionHow to check Persian date format? Pin
Alex Dunlop7-Aug-21 21:19
Alex Dunlop7-Aug-21 21:19 
AnswerRe: How to check Persian date format? Pin
OriginalGriff7-Aug-21 21:22
mveOriginalGriff7-Aug-21 21:22 
GeneralRe: How to check Persian date format? Pin
Alex Dunlop7-Aug-21 21:37
Alex Dunlop7-Aug-21 21:37 
QuestionNotifications in win c# Pin
Member 149572104-Aug-21 18:35
Member 149572104-Aug-21 18:35 
AnswerRe: Notifications in win c# Pin
OriginalGriff4-Aug-21 20:43
mveOriginalGriff4-Aug-21 20:43 
QuestionError when importing a class dll Pin
Alex Dunlop3-Aug-21 23:42
Alex Dunlop3-Aug-21 23:42 
AnswerRe: Error when importing a class dll Pin
Richard Deeming4-Aug-21 0:44
mveRichard Deeming4-Aug-21 0:44 
Have you opened the folder instead of the project?
c# - Could not load file or assembly 'System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' - Stack Overflow[^]

NB: Your code can be greatly simplified:
C#
public static int ExtractNumber(string text)
{
    if (string.IsNullOrEmpty(text)) throw new ArgumentNullException(nameof(text));
    
    int result = 0;
    foreach (char c in text)
    {
        if (c >= '0' && c <= '9')
        {
            int digit = c - '0';
            result = checked(result * 10 + digit);
        }
    }
    
    return result;
}




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

GeneralRe: Error when importing a class dll Pin
Alex Dunlop4-Aug-21 1:54
Alex Dunlop4-Aug-21 1:54 
GeneralRe: Error when importing a class dll Pin
Alex Dunlop4-Aug-21 9:44
Alex Dunlop4-Aug-21 9:44 
GeneralRe: Error when importing a class dll Pin
Richard Deeming4-Aug-21 23:05
mveRichard Deeming4-Aug-21 23:05 
AnswerRe: Error when importing a class dll Pin
Richard MacCutchan4-Aug-21 2:31
mveRichard MacCutchan4-Aug-21 2:31 
GeneralRe: Error when importing a class dll Pin
Richard Andrew x644-Aug-21 8:29
professionalRichard Andrew x644-Aug-21 8:29 
GeneralRe: Error when importing a class dll Pin
Richard MacCutchan4-Aug-21 8:32
mveRichard MacCutchan4-Aug-21 8:32 
GeneralRe: Error when importing a class dll Pin
Bohdan Stupak6-Aug-21 6:06
professionalBohdan Stupak6-Aug-21 6:06 
AnswerRe: Error when importing a class dll Pin
BillWoodruff8-Aug-21 21:30
professionalBillWoodruff8-Aug-21 21:30 
SuggestionRe: Error when importing a class dll Pin
Richard Deeming8-Aug-21 22:20
mveRichard Deeming8-Aug-21 22:20 
GeneralRe: Error when importing a class dll Pin
BillWoodruff9-Aug-21 0:28
professionalBillWoodruff9-Aug-21 0:28 
QuestionFloating point conversion with error Pin
Ismael Oliveira 20211-Aug-21 14:14
Ismael Oliveira 20211-Aug-21 14:14 
AnswerRe: Floating point conversion with error Pin
OriginalGriff1-Aug-21 20:12
mveOriginalGriff1-Aug-21 20:12 
GeneralRe: Floating point conversion with error Pin
Ismael Oliveira 20212-Aug-21 16:45
Ismael Oliveira 20212-Aug-21 16:45 
AnswerRe: Floating point conversion with error Pin
Richard MacCutchan1-Aug-21 22:51
mveRichard MacCutchan1-Aug-21 22:51 
GeneralRe: Floating point conversion with error Pin
Ismael Oliveira 20212-Aug-21 16:59
Ismael Oliveira 20212-Aug-21 16:59 
AnswerRe: Floating point conversion with error Pin
jsc422-Aug-21 2:21
professionaljsc422-Aug-21 2:21 
GeneralRe: Floating point conversion with error Pin
Ismael Oliveira 20212-Aug-21 16:58
Ismael Oliveira 20212-Aug-21 16:58 

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.