Click here to Skip to main content
12,248,681 members (51,411 online)
   

C#

 
GeneralRe: to access latitudes and longitudes from database Pin
PIEBALDconsult31-Dec-12 7:22
memberPIEBALDconsult31-Dec-12 7:22 
Questionhow to extract tag in regular expressions c# Pin
ngoanrazor30-Dec-12 6:02
memberngoanrazor30-Dec-12 6:02 
AnswerRe: how to extract tag in regular expressions c# Pin
PIEBALDconsult30-Dec-12 6:39
memberPIEBALDconsult30-Dec-12 6:39 
GeneralRe: how to extract tag in regular expressions c# Pin
OriginalGriff30-Dec-12 22:20
mvpOriginalGriff30-Dec-12 22:20 
GeneralRe: how to extract tag in regular expressions c# Pin
Zac Greve31-Dec-12 13:16
memberZac Greve31-Dec-12 13:16 
GeneralRe: how to extract tag in regular expressions c# Pin
PIEBALDconsult31-Dec-12 13:24
memberPIEBALDconsult31-Dec-12 13:24 
QuestionBoolean function to return true/false Pin
Member 970415330-Dec-12 3:57
memberMember 970415330-Dec-12 3:57 
AnswerRe: Boolean function to return true/false Pin
Richard MacCutchan30-Dec-12 5:12
mvpRichard MacCutchan30-Dec-12 5:12 
Modify your test so it breaks out of the loop as soon as a match is found
for (int j = 0; j < excelSheets.Length; j++)
{
    if (excelSheets[j] == "Sheet1$")
    {
        Match = true;
        break;
    }
}
//delete the following lines after the loop
if (Match == true)
    return true;
else
    return false;
// add this line after the finally block
return Match;

[edit]
You could actually check the names in your foreach block to make it more efficient.
[/edit]
One of these days I'm going to think of a really clever signature.

GeneralRe: Boolean function to return true/false Pin
Member 970415330-Dec-12 5:18
memberMember 970415330-Dec-12 5:18 
GeneralRe: Boolean function to return true/false Pin
Richard MacCutchan30-Dec-12 5:25
mvpRichard MacCutchan30-Dec-12 5:25 
GeneralRe: Boolean function to return true/false Pin
Member 970415330-Dec-12 6:42
memberMember 970415330-Dec-12 6:42 
GeneralRe: Boolean function to return true/false Pin
Richard MacCutchan30-Dec-12 6:45
mvpRichard MacCutchan30-Dec-12 6:45 
AnswerRe: Boolean function to return true/false Pin
Matt T Heffron3-Jan-13 20:54
memberMatt T Heffron3-Jan-13 20:54 
GeneralRe: Boolean function to return true/false Pin
Member 97041533-Jan-13 22:00
memberMember 97041533-Jan-13 22:00 
GeneralRe: Boolean function to return true/false Pin
Member 97041537-Jan-13 10:55
memberMember 97041537-Jan-13 10:55 
AnswerRe: Boolean function to return true/false Pin
Matt T Heffron7-Jan-13 11:17
memberMatt T Heffron7-Jan-13 11:17 
GeneralRe: Boolean function to return true/false Pin
Member 97041537-Jan-13 11:26
memberMember 97041537-Jan-13 11:26 
AnswerRe: Boolean function to return true/false Pin
Matt T Heffron7-Jan-13 12:01
memberMatt T Heffron7-Jan-13 12:01 
GeneralRe: Boolean function to return true/false Pin
Member 97041537-Jan-13 12:30
memberMember 97041537-Jan-13 12:30 
GeneralRe: Boolean function to return true/false Pin
Member 97041537-Jan-13 12:57
memberMember 97041537-Jan-13 12:57 
AnswerRe: Boolean function to return true/false Pin
Matt T Heffron7-Jan-13 13:03
memberMatt T Heffron7-Jan-13 13:03 
GeneralRe: Boolean function to return true/false Pin
Member 97041537-Jan-13 13:12
memberMember 97041537-Jan-13 13:12 
AnswerRe: Boolean function to return true/false Pin
Matt T Heffron7-Jan-13 13:29
memberMatt T Heffron7-Jan-13 13:29 
GeneralRe: Boolean function to return true/false Pin
Member 97041537-Jan-13 13:39
memberMember 97041537-Jan-13 13:39 
GeneralRe: Boolean function to return true/false Pin
Matt T Heffron7-Jan-13 12:57
memberMatt T Heffron7-Jan-13 12:57 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.160426.1 | Last Updated 3 May 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid