Click here to Skip to main content
15,886,963 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to pass folder hierarchy when creating zip file from memory stream using DotNetZip library Pin
Tridip Bhattacharjee6-Apr-15 21:27
professionalTridip Bhattacharjee6-Apr-15 21:27 
SuggestionRe: How to pass folder hierarchy when creating zip file from memory stream using DotNetZip library Pin
Richard Deeming7-Apr-15 2:07
mveRichard Deeming7-Apr-15 2:07 
Questionsplit string Pin
Member 103707115-Apr-15 12:53
professionalMember 103707115-Apr-15 12:53 
AnswerRe: split string Pin
Richard Andrew x645-Apr-15 13:07
professionalRichard Andrew x645-Apr-15 13:07 
GeneralصهفاRe: split string Pin
Member 103707115-Apr-15 13:20
professionalMember 103707115-Apr-15 13:20 
GeneralRe: split string Pin
PIEBALDconsult5-Apr-15 13:23
mvePIEBALDconsult5-Apr-15 13:23 
GeneralRe: split string Pin
Member 103707115-Apr-15 13:27
professionalMember 103707115-Apr-15 13:27 
GeneralRe: split string Pin
Dr Gadgit6-Apr-15 3:39
Dr Gadgit6-Apr-15 3:39 
"Regular Expression"

Now thats one thing i can never get my head around and yet my two most used functions of all time used in a string extention method could be done using a one line RegEx
C#
public static string ChopOffBefore(this string s, string Before)
{//Usefull function for chopping up strings
    int End = s.ToUpper().IndexOf(Before.ToUpper());
    if (End > -1)
    {
        return s.Substring(End + Before.Length);
    }
    return s;
}
public static string ChopOffAfter(this string s, string After)
{//Usefull function for chopping up strings
    int End = s.ToUpper().IndexOf(After.ToUpper());
    if (End > -1)
    {
        return s.Substring(0, End);
    }
    return s;
}

I just could not live without them, must be old school

modified 6-Apr-15 10:54am.

SuggestionRe: split string Pin
Richard Deeming7-Apr-15 2:10
mveRichard Deeming7-Apr-15 2:10 
GeneralRe: split string Pin
Dr Gadgit11-Apr-15 7:36
Dr Gadgit11-Apr-15 7:36 
QuestionHow to Install Windows OS On selected IP's In a Network Pin
Member 105963985-Apr-15 0:20
Member 105963985-Apr-15 0:20 
AnswerRe: How to Install Windows OS On selected IP's In a Network Pin
OriginalGriff5-Apr-15 1:21
mveOriginalGriff5-Apr-15 1:21 
GeneralRe: How to Install Windows OS On selected IP's In a Network Pin
Member 105963985-Apr-15 1:55
Member 105963985-Apr-15 1:55 
GeneralRe: How to Install Windows OS On selected IP's In a Network Pin
OriginalGriff5-Apr-15 2:13
mveOriginalGriff5-Apr-15 2:13 
GeneralRe: How to Install Windows OS On selected IP's In a Network Pin
Dave Kreskowiak5-Apr-15 4:16
mveDave Kreskowiak5-Apr-15 4:16 
AnswerRe: How to Install Windows OS On selected IP's In a Network Pin
Dave Kreskowiak5-Apr-15 3:58
mveDave Kreskowiak5-Apr-15 3:58 
GeneralRe: How to Install Windows OS On selected IP's In a Network Pin
OriginalGriff5-Apr-15 5:39
mveOriginalGriff5-Apr-15 5:39 
GeneralRe: How to Install Windows OS On selected IP's In a Network Pin
Dave Kreskowiak5-Apr-15 5:43
mveDave Kreskowiak5-Apr-15 5:43 
GeneralRe: How to Install Windows OS On selected IP's In a Network Pin
OriginalGriff5-Apr-15 5:57
mveOriginalGriff5-Apr-15 5:57 
QuestionHow to extract XMLElement of selectedItem of ListBox in WPF? Pin
ShanmugaKS4-Apr-15 12:18
ShanmugaKS4-Apr-15 12:18 
AnswerRe: How to extract XMLElement of selectedItem of ListBox in WPF? Pin
Richard Deeming7-Apr-15 2:18
mveRichard Deeming7-Apr-15 2:18 
QuestionSelect element from a List<> Pin
DPaul19944-Apr-15 8:38
DPaul19944-Apr-15 8:38 
AnswerRe: Select element from a List<> Pin
BillWoodruff4-Apr-15 9:30
professionalBillWoodruff4-Apr-15 9:30 
GeneralRe: Select element from a List<> Pin
DPaul19944-Apr-15 10:38
DPaul19944-Apr-15 10:38 
GeneralRe: Select element from a List<> Pin
DPaul19944-Apr-15 10:45
DPaul19944-Apr-15 10:45 

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.