Click here to Skip to main content
16,016,180 members
Home / Discussions / C#
   

C#

 
Questionhow to use dll(mfc) in web service Pin
wangxuefeng23-Feb-04 14:51
wangxuefeng23-Feb-04 14:51 
AnswerRe: how to use dll(mfc) in web service Pin
Heath Stewart24-Feb-04 4:19
protectorHeath Stewart24-Feb-04 4:19 
GeneralRe: how to use dll(mfc) in web service Pin
wangxuefeng24-Feb-04 23:26
wangxuefeng24-Feb-04 23:26 
GeneralRe: how to use dll(mfc) in web service Pin
Heath Stewart25-Feb-04 2:43
protectorHeath Stewart25-Feb-04 2:43 
GeneralRe: how to use dll(mfc) in web service Pin
wangxuefeng25-Feb-04 13:36
wangxuefeng25-Feb-04 13:36 
AnswerRe: how to use dll(mfc) in web service Pin
wangxuefeng24-Feb-04 21:43
wangxuefeng24-Feb-04 21:43 
Generalfile processing Pin
Rob Tomson23-Feb-04 12:47
Rob Tomson23-Feb-04 12:47 
GeneralRe: file processing Pin
je_gonzalez23-Feb-04 15:27
je_gonzalez23-Feb-04 15:27 
The easiest way would be to post your question and have some write the code for you.

Here is the code:

private string FindSame(params string[] values)
{
// Default to nothing
string sAns = null;

// Start out before any valid value
int iSame = -1;

// Do we have any strings?
if (values.Length > 0)
{
// Setup for looping
bool bLoop = true;

// Holding area
char cChecking = ' ';
// Flag
bool bCheckingValid;

// Loop
while (bLoop)
{
// Move on to next character
iSame++;
// Reset flag
bCheckingValid = false;
//Loop thru the strings
for (int iValue = values.GetLowerBound(0); iValue <= values.GetUpperBound(0); iValue++)
{
// Reached the end?
if (iValue >= values[iValue].Length)
{
// No more soup for you
bLoop = false;
}
else
{
// Do we have something to compare against?
if (!bCheckingValid)
{
// Pick up comparison
cChecking = values[iValue][iSame];
// Flag that we got a value
bCheckingValid = true;
}
else
{
// Compare to string
if (cChecking != values[iValue][iSame])
{
// Mismatch!
bLoop = false;
}
}
}
}
}

// Get the string
sAns = values[values.GetLowerBound(0)].Substring(0, iSame);
}

// Return
return sAns;
}


and here is a sample call:

string sSame = this.FindSame(
@"c:\dir1\dir2\abc\abcd\file.ext",
@"c:\dir1\dir2\abc\efgh\file.ext",
@"c:\dir1\dir2\abc\efgh\123\file.ext");


GeneralRe: file processing Pin
Heath Stewart24-Feb-04 4:14
protectorHeath Stewart24-Feb-04 4:14 
GeneralRe: file processing Pin
je_gonzalez24-Feb-04 5:04
je_gonzalez24-Feb-04 5:04 
GeneralRe: file processing Pin
Rob Tomson24-Feb-04 17:45
Rob Tomson24-Feb-04 17:45 
GeneralRe: file processing Pin
je_gonzalez24-Feb-04 19:40
je_gonzalez24-Feb-04 19:40 
Questionhow to clear a combobox? Pin
Anonymous23-Feb-04 11:56
Anonymous23-Feb-04 11:56 
AnswerRe: how to clear a combobox? Pin
Werdna23-Feb-04 14:27
Werdna23-Feb-04 14:27 
QuestionHow to get number of running threads? Pin
CWIZO23-Feb-04 11:32
CWIZO23-Feb-04 11:32 
AnswerRe: How to get number of running threads? Pin
Heath Stewart24-Feb-04 4:03
protectorHeath Stewart24-Feb-04 4:03 
GeneralRe: How to get number of running threads? Pin
CWIZO24-Feb-04 4:08
CWIZO24-Feb-04 4:08 
GeneralWin32 to .NET Framework API Map Pin
Kant23-Feb-04 9:10
Kant23-Feb-04 9:10 
GeneralRe: Win32 to .NET Framework API Map Pin
Kentamanos23-Feb-04 11:10
Kentamanos23-Feb-04 11:10 
GeneralRe: Win32 to .NET Framework API Map Pin
Alexsander Antunes1-Mar-04 7:52
professionalAlexsander Antunes1-Mar-04 7:52 
GeneralChanging border color in a Win Button control. Pin
jose.cebrian23-Feb-04 8:51
sussjose.cebrian23-Feb-04 8:51 
GeneralRe: Changing border color in a Win Button control. Pin
Heath Stewart23-Feb-04 9:16
protectorHeath Stewart23-Feb-04 9:16 
GeneralRe: Changing border color in a Win Button control. Pin
jose.cebrian23-Feb-04 22:31
sussjose.cebrian23-Feb-04 22:31 
GeneralCOM - STRRET Issues Pin
Tristan Rhodes23-Feb-04 8:34
Tristan Rhodes23-Feb-04 8:34 
GeneralRe: COM - STRRET Issues Pin
Heath Stewart23-Feb-04 9:14
protectorHeath Stewart23-Feb-04 9:14 

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.