Click here to Skip to main content
15,910,211 members
Home / Discussions / C#
   

C#

 
AnswerRe: How do I remove double quotes from Excel cell when data is exported to Excel in VB code? Pin
Richard Deeming24-Feb-20 8:49
mveRichard Deeming24-Feb-20 8:49 
AnswerRe: How do I remove double quotes from Excel cell when data is exported to Excel in VB code? Pin
jsc4229-Feb-20 11:13
professionaljsc4229-Feb-20 11:13 
QuestionC# Pin
Member 1475231922-Feb-20 2:35
Member 1475231922-Feb-20 2:35 
AnswerRe: C# Pin
OriginalGriff22-Feb-20 4:21
mveOriginalGriff22-Feb-20 4:21 
QuestionC# string comparison ignoring diacritics, except unicode half-space (\u200c) Pin
Ayub Kokabi20-Feb-20 23:25
Ayub Kokabi20-Feb-20 23:25 
AnswerRe: C# string comparison ignoring diacritics, except unicode half-space (\u200c) Pin
Gerry Schmitz21-Feb-20 6:11
mveGerry Schmitz21-Feb-20 6:11 
GeneralRe: C# string comparison ignoring diacritics, except unicode half-space (\u200c) Pin
Ayub Kokabi21-Feb-20 7:37
Ayub Kokabi21-Feb-20 7:37 
GeneralRe: C# string comparison ignoring diacritics, except unicode half-space (\u200c) Pin
Gerry Schmitz21-Feb-20 8:07
mveGerry Schmitz21-Feb-20 8:07 
Questionquery to a xml database Pin
devilonline119-Feb-20 15:57
devilonline119-Feb-20 15:57 
AnswerRe: query to a xml database Pin
OriginalGriff19-Feb-20 20:04
mveOriginalGriff19-Feb-20 20:04 
GeneralRe: query to a xml database Pin
devilonline120-Feb-20 8:59
devilonline120-Feb-20 8:59 
GeneralRe: query to a xml database Pin
Richard Deeming21-Feb-20 0:55
mveRichard Deeming21-Feb-20 0:55 
AnswerRe: query to a xml database Pin
F-ES Sitecore19-Feb-20 23:08
professionalF-ES Sitecore19-Feb-20 23:08 
AnswerRe: query to a xml database Pin
Alkimus15-Mar-20 5:16
professionalAlkimus15-Mar-20 5:16 
QuestionSystem.Web.Services.Protocols.SoapException: Format of the initialization string does not conform to specification starting at index 97. Pin
Member 1474982719-Feb-20 15:36
Member 1474982719-Feb-20 15:36 
QuestionHow to do left and inner join in same query Pin
Mou_kol19-Feb-20 9:34
Mou_kol19-Feb-20 9:34 
AnswerRe: How to do left and inner join in same query Pin
Gerry Schmitz19-Feb-20 12:13
mveGerry Schmitz19-Feb-20 12:13 
GeneralRe: How to do left and inner join in same query Pin
Mou_kol21-Feb-20 22:42
Mou_kol21-Feb-20 22:42 
QuestionBest deployment guide for our winform application using CI/CD Pin
Mou_kol18-Feb-20 8:24
Mou_kol18-Feb-20 8:24 
AnswerRe: Best deployment guide for our winform application using CI/CD Pin
Richard MacCutchan18-Feb-20 10:25
mveRichard MacCutchan18-Feb-20 10:25 
QuestionSystem.FormatException: 'Input string was not in a correct format. Pin
OsvaldoFernandoQueta17-Feb-20 17:43
OsvaldoFernandoQueta17-Feb-20 17:43 
AnswerRe: System.FormatException: 'Input string was not in a correct format. Pin
OriginalGriff17-Feb-20 20:35
mveOriginalGriff17-Feb-20 20:35 
GeneralRe: System.FormatException: 'Input string was not in a correct format. Pin
kalberts17-Feb-20 23:17
kalberts17-Feb-20 23:17 
OriginalGriff wrote:
You can't "solve" an input string format problem: it says what it means: the user typed a value that cannot be interpreted as a valid double
This could be a culture issue. In many languages, the decimal point is a decimal comma; the point is used as the thousands separator.

The simple form of TryParse (or Convert.ToDouble) use the "Digit grouping symbol" and "Decimal symbol" specified in the regional settings. I am not familiar with Spanish conventions (and maybe in varies among Spanish speaking countries): If the local convention is to uses comma as a decimal symbol, but the regional settings have not been set properly to reflect this entering e.g. 1.234.567,89 will cause a format error.

Alternately, if regional settings are set to the local culture, but the user is accustomed to having to follow English conventions when working with computers, and enters 1,234,567.89, it will fail as well.

ToDouble and TryParse have overloads allowing the specification of a format, so that you can override the regional setting. If you want to accept either, you must scan the string: If both comma and point appears in the string, whichever appears first is likely to be the digit grouping symbol, not a decimal symbol. If only one of them appears, but multiple times, it is likely to be a digit grouping symbol.

If only one of them apppears, once, the format is ambiguous. You might guess that if the number of digits following the symbol is anything but 3, it is a decimal symbol. Or the context may indicate which is the most probable interpretation - usually, one value is more likely than thousand times larger or smaller. Or, if you in the same application activation have had other numbers input, containing both comma and point, you may assume that the same numeric format is used, in ambiguous cases.

Once you have determined the proper comma/point interpretation, you can call the TryParse function with the proper format indicator.
QuestionI want to open PDF-file on winforms axAcroPDF1.src (Adobe Reader) Pin
Member 1462552315-Feb-20 1:32
Member 1462552315-Feb-20 1:32 
AnswerRe: I want to open PDF-file on winforms axAcroPDF1.src (Adobe Reader) Pin
Eddy Vluggen15-Feb-20 2:59
professionalEddy Vluggen15-Feb-20 2:59 

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.