Click here to Skip to main content
15,883,901 members
Home / Discussions / C#
   

C#

 
GeneralRe: Outlookaddin Pin
Member 1475442324-Feb-20 22:20
Member 1475442324-Feb-20 22:20 
GeneralRe: Outlookaddin Pin
OriginalGriff24-Feb-20 22:42
mveOriginalGriff24-Feb-20 22:42 
QuestionHow do I remove double quotes from Excel cell when data is exported to Excel in VB code? Pin
Member 1140330424-Feb-20 7:46
Member 1140330424-Feb-20 7:46 
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 
I have an ICollectionView bound to a DataGrid which contains 1 million items and should be filtered as user types in a search text box. Due to the large number of items, filtering algorithm should be performance friendly.

This is my current string comparison (some part of filtering method):

C#
static bool AreEqual(string str1, string str2)
{
    var compareInfo = CultureInfo.InvariantCulture.CompareInfo;
    bool result = compareInfo.IndexOf(str1, str2, CompareOptions.IgnoreNonSpace) > -1;
    return result;
}


The CompareOptions.IgnoreNonSpace ignore diacritics very well but ignores half space with Unicode \u200c too, which is not what I want. I just want to ignore diacritics.

C#
bool compare1 = AreEqual("آبی","آبی");  //true, It's Okay.
bool compare2 = AreEqual("آبی", "ابی"); //true. It's Okay.
bool compare3 = AreEqual("آبی", "آب‌ی"); //true. This is not what I want. It should return false
bool compare4 = AreEqual("آبی", "اب‌ی"); //true. This is not what I want. It should return false.


Since, the performance is critical, I can't remove diacritics with normalizing strings before comparison.

One more question:

I want to filter CollectionView, in a way that, first 10 results will be returned and continue to search in a background thread while user is reading current DataGrid viewport. When user scrolls the DataGrid, show next 10 results which are filtered in the background thread. I don't want user waits for CollectionView to finish filtering 1 million items.
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 

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.