Click here to Skip to main content
15,887,450 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to add an attribute to a XML node Pin
Not Active2-Feb-10 7:46
mentorNot Active2-Feb-10 7:46 
GeneralRe: How to add an attribute to a XML node Pin
Petri Luoto2-Feb-10 8:24
Petri Luoto2-Feb-10 8:24 
Questionsort datagridview Pin
jashimu2-Feb-10 5:45
jashimu2-Feb-10 5:45 
QuestionRemove all characters in a string up to and including a specified pattern Pin
MarkB1232-Feb-10 5:27
MarkB1232-Feb-10 5:27 
AnswerRe: Remove all characters in a string up to and including a specified pattern Pin
PIEBALDconsult2-Feb-10 5:31
mvePIEBALDconsult2-Feb-10 5:31 
AnswerRe: Remove all characters in a string up to and including a specified pattern Pin
sanforjackass2-Feb-10 5:33
sanforjackass2-Feb-10 5:33 
GeneralRe: Remove all characters in a string up to and including a specified pattern Pin
OriginalGriff2-Feb-10 5:42
mveOriginalGriff2-Feb-10 5:42 
AnswerRe: Remove all characters in a string up to and including a specified pattern Pin
OkkiePepernoot2-Feb-10 6:01
OkkiePepernoot2-Feb-10 6:01 
string initialText = "this_is_a test|XXmoretexthere";
string searchString = "|XX";
int lastIndexFound = initialText.LastIndexOf(searchString);
if (lastIndexFound > 0)
{
  MessageBox.Show(initialText.Substring(lastIndexFound + searchString.Length));
}
else
{
  MessageBox.Show("Patternt not found");
}


  • Not sure if this is fast enough...
  • Not sure if the search is case sensitive otherwise....

  • GeneralRe: Remove all characters in a string up to and including a specified pattern Pin
    MarkB1232-Feb-10 8:28
    MarkB1232-Feb-10 8:28 
    AnswerRe: Remove all characters in a string up to and including a specified pattern Pin
    Ramkithepower3-Feb-10 1:38
    Ramkithepower3-Feb-10 1:38 
    GeneralRe: Remove all characters in a string up to and including a specified pattern Pin
    MarkB1233-Feb-10 11:37
    MarkB1233-Feb-10 11:37 
    Questionzooming/panning Pin
    sarai002-Feb-10 5:24
    sarai002-Feb-10 5:24 
    QuestionC# Create Excelfile Pin
    Mschauder2-Feb-10 3:26
    Mschauder2-Feb-10 3:26 
    AnswerRe: C# Create Excelfile Pin
    The Man from U.N.C.L.E.2-Feb-10 3:40
    The Man from U.N.C.L.E.2-Feb-10 3:40 
    QuestionGmail Samples Pin
    Anil Kumar.Arvapalli2-Feb-10 3:17
    Anil Kumar.Arvapalli2-Feb-10 3:17 
    AnswerRe: Gmail Samples Pin
    WoutL2-Feb-10 3:23
    WoutL2-Feb-10 3:23 
    AnswerRe: Gmail Samples Pin
    Abhinav S2-Feb-10 3:44
    Abhinav S2-Feb-10 3:44 
    QuestionTrouble with drawing on winfrom in new thread Pin
    Frozzeg2-Feb-10 2:45
    Frozzeg2-Feb-10 2:45 
    AnswerRe: Trouble with drawing on winfrom in new thread Pin
    Luc Pattyn2-Feb-10 3:29
    sitebuilderLuc Pattyn2-Feb-10 3:29 
    AnswerRe: Trouble with drawing on winfrom in new thread Pin
    The Man from U.N.C.L.E.2-Feb-10 3:52
    The Man from U.N.C.L.E.2-Feb-10 3:52 
    GeneralRe: Trouble with drawing on winfrom in new thread Pin
    Frozzeg2-Feb-10 8:00
    Frozzeg2-Feb-10 8:00 
    GeneralRe: Trouble with drawing on winfrom in new thread Pin
    Dave Kreskowiak2-Feb-10 8:53
    mveDave Kreskowiak2-Feb-10 8:53 
    QuestionComboBox index Databind Pin
    Kaikus2-Feb-10 2:22
    Kaikus2-Feb-10 2:22 
    AnswerRe: ComboBox index Databind Pin
    The Man from U.N.C.L.E.2-Feb-10 4:01
    The Man from U.N.C.L.E.2-Feb-10 4:01 
    Question.NET applications? Pin
    ppayal2-Feb-10 0:12
    ppayal2-Feb-10 0:12 

    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.