Click here to Skip to main content
15,911,531 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# Decompiler Pin
Colin Angus Mackay17-Feb-07 11:22
Colin Angus Mackay17-Feb-07 11:22 
GeneralRe: C# Decompiler Pin
Eddymvp17-Feb-07 14:54
Eddymvp17-Feb-07 14:54 
AnswerRe: C# Decompiler Pin
Guffa17-Feb-07 15:19
Guffa17-Feb-07 15:19 
GeneralRe: C# Decompiler Pin
Ed.Poore17-Feb-07 20:01
Ed.Poore17-Feb-07 20:01 
QuestionText extraction -- This one will make you dizzy Pin
AngryC17-Feb-07 10:10
AngryC17-Feb-07 10:10 
AnswerRe: Text extraction -- This one will make you dizzy Pin
Pete O'Hanlon17-Feb-07 10:21
mvePete O'Hanlon17-Feb-07 10:21 
GeneralRe: Text extraction -- This one will make you dizzy Pin
AngryC17-Feb-07 11:04
AngryC17-Feb-07 11:04 
GeneralRe: Text extraction -- This one will make you dizzy Pin
Luc Pattyn17-Feb-07 12:14
sitebuilderLuc Pattyn17-Feb-07 12:14 
I think this will come close to what you want:

public void test() {
    string var1 = "5567 87865 4432 54535 6678 4435";
    string var2 = "667 332 32 555677 4465 44444444";
    string part_of_var1 = "4432 54535";
    string xxx=getPartsOfVar2(var1, var2, part_of_var1, ' ');
    Console.WriteLine(xxx);
|

public string getPartsOfVar2(string var1, string var2, string part_of_var1, char sep) {
    string[] arr1=var1.Split(sep);
    string[] arr2=var2.Split(sep);
    if (arr1.Length!=arr2.Length) throw some exception;
    string[] arr1p=part_of_var1.Split(sep);
    int partCount=arr1p.Length;
    string[] arr2p=new string[partCount];
    for(int i=0; i<partCount; i++) {
        string part=arr1p[i];
        int index=arr1.IndexOf(part);
        if (index<0) throw some exception;
        arr2p[i]=arr2[index];
    }
    return String.Join(sep, arr2p);
}


Smile | :)



Luc Pattyn

[My Articles]

GeneralRe: Text extraction -- This one will make you dizzy Pin
AngryC17-Feb-07 14:15
AngryC17-Feb-07 14:15 
GeneralRe: Text extraction -- This one will make you dizzy Pin
Luc Pattyn17-Feb-07 15:16
sitebuilderLuc Pattyn17-Feb-07 15:16 
AnswerRe: Text extraction -- This one will make you dizzy Pin
Guffa17-Feb-07 14:18
Guffa17-Feb-07 14:18 
GeneralRe: Text extraction -- This one will make you dizzy Pin
AngryC17-Feb-07 14:22
AngryC17-Feb-07 14:22 
AnswerRe: Text extraction -- This one will make you dizzy Pin
Guffa17-Feb-07 15:21
Guffa17-Feb-07 15:21 
GeneralRe: Text extraction -- This one will make you dizzy Pin
AngryC18-Feb-07 4:00
AngryC18-Feb-07 4:00 
GeneralRe: Text extraction -- This one will make you dizzy Pin
AngryC18-Feb-07 14:13
AngryC18-Feb-07 14:13 
GeneralRe: Text extraction -- This one will make you dizzy Pin
Guffa19-Feb-07 5:01
Guffa19-Feb-07 5:01 
GeneralRe: Text extraction -- This one will make you dizzy Pin
AngryC19-Feb-07 12:44
AngryC19-Feb-07 12:44 
QuestionWhat is the best way to represent a set of references ? Pin
zark9217-Feb-07 9:31
zark9217-Feb-07 9:31 
AnswerRe: What is the best way to represent a set of references ? Pin
Thomas Stockwell17-Feb-07 11:36
professionalThomas Stockwell17-Feb-07 11:36 
AnswerRe: What is the best way to represent a set of references ? Pin
Luc Pattyn17-Feb-07 12:20
sitebuilderLuc Pattyn17-Feb-07 12:20 
AnswerRe: What is the best way to represent a set of references ? Pin
zark9218-Feb-07 21:15
zark9218-Feb-07 21:15 
QuestionListview with images? Pin
sharpiesharpie17-Feb-07 8:23
sharpiesharpie17-Feb-07 8:23 
AnswerRe: Listview with images? Pin
Pete O'Hanlon17-Feb-07 9:59
mvePete O'Hanlon17-Feb-07 9:59 
QuestionHow can i connect C# to a IBM db2 server? Pin
icesha17-Feb-07 7:14
icesha17-Feb-07 7:14 
Questionxml attributes and sql database Pin
spin vector17-Feb-07 6:11
spin vector17-Feb-07 6:11 

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.