Click here to Skip to main content
15,888,527 members
Home / Discussions / C#
   

C#

 
GeneralRe: Error must declare scalar variable @ISBN update statement c# Pin
phil.o29-Feb-20 22:44
professionalphil.o29-Feb-20 22:44 
QuestionESENTUTL in C# Pin
colins528629-Feb-20 4:28
colins528629-Feb-20 4:28 
AnswerRe: ESENTUTL in C# Pin
OriginalGriff29-Feb-20 5:40
mveOriginalGriff29-Feb-20 5:40 
AnswerRe: ESENTUTL in C# Pin
Luc Pattyn29-Feb-20 9:27
sitebuilderLuc Pattyn29-Feb-20 9:27 
AnswerRe: ESENTUTL in C# Pin
Dave Kreskowiak29-Feb-20 10:38
mveDave Kreskowiak29-Feb-20 10:38 
AnswerRe: ESENTUTL in C# Pin
colins52861-Mar-20 22:50
colins52861-Mar-20 22:50 
GeneralRe: ESENTUTL in C# Pin
Richard Deeming1-Mar-20 23:49
mveRichard Deeming1-Mar-20 23:49 
GeneralRe: ESENTUTL in C# Pin
colins52862-Mar-20 6:48
colins52862-Mar-20 6:48 
GeneralRe: ESENTUTL in C# Pin
Richard Deeming2-Mar-20 7:08
mveRichard Deeming2-Mar-20 7:08 
AnswerRe: ESENTUTL in C# Pin
Mc_Topaz3-Mar-20 21:48
Mc_Topaz3-Mar-20 21:48 
QuestionNeed to Change DatagridView POP background color from Vincenzo Rossi Pin
Member 1464144527-Feb-20 17:25
Member 1464144527-Feb-20 17:25 
AnswerRe: Need to Change DatagridView POP background color from Vincenzo Rossi Pin
Pete O'Hanlon27-Feb-20 20:30
mvePete O'Hanlon27-Feb-20 20:30 
AnswerRe: Need to Change DatagridView POP background color from Vincenzo Rossi Pin
OriginalGriff27-Feb-20 20:33
mveOriginalGriff27-Feb-20 20:33 
QuestionOutlookaddin Pin
Member 1475442324-Feb-20 19:26
Member 1475442324-Feb-20 19:26 
AnswerRe: Outlookaddin Pin
OriginalGriff24-Feb-20 20:28
mveOriginalGriff24-Feb-20 20:28 
GeneralRe: Outlookaddin Pin
Member 1475442324-Feb-20 22:01
Member 1475442324-Feb-20 22:01 
GeneralRe: Outlookaddin Pin
OriginalGriff24-Feb-20 22:16
mveOriginalGriff24-Feb-20 22:16 
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.

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.