Click here to Skip to main content
11,642,381 members (61,680 online)
   

C#

 
AnswerIt's a game :) Pin
Eddy Vluggen1-Jan-13 6:01
memberEddy Vluggen1-Jan-13 6:01 
GeneralRe: It's a game :) Pin
ProgramFOX1-Jan-13 6:05
member ProgramFOX1-Jan-13 6:05 
Generalto access latitudes and longitudes from database Pin
naveen 201230-Dec-12 22:28
membernaveen 201230-Dec-12 22:28 
GeneralRe: to access latitudes and longitudes from database Pin
OriginalGriff30-Dec-12 23:22
mvpOriginalGriff30-Dec-12 23:22 
GeneralRe: to access latitudes and longitudes from database Pin
Pete O'Hanlon30-Dec-12 23:54
protectorPete O'Hanlon30-Dec-12 23:54 
GeneralRe: to access latitudes and longitudes from database Pin
Ennis Ray Lynch, Jr.31-Dec-12 5:36
memberEnnis Ray Lynch, Jr.31-Dec-12 5:36 
GeneralRe: to access latitudes and longitudes from database Pin
PIEBALDconsult31-Dec-12 6:22
memberPIEBALDconsult31-Dec-12 6:22 
Questionhow to extract tag in regular expressions c# Pin
ngoanrazor30-Dec-12 5:02
memberngoanrazor30-Dec-12 5:02 
AnswerRe: how to extract tag in regular expressions c# Pin
PIEBALDconsult30-Dec-12 5:39
memberPIEBALDconsult30-Dec-12 5:39 
GeneralRe: how to extract tag in regular expressions c# Pin
OriginalGriff30-Dec-12 21:20
mvpOriginalGriff30-Dec-12 21:20 
GeneralRe: how to extract tag in regular expressions c# Pin
Zac Greve31-Dec-12 12:16
memberZac Greve31-Dec-12 12:16 
GeneralRe: how to extract tag in regular expressions c# Pin
PIEBALDconsult31-Dec-12 12:24
memberPIEBALDconsult31-Dec-12 12:24 
QuestionBoolean function to return true/false Pin
Member 970415330-Dec-12 2:57
memberMember 970415330-Dec-12 2:57 
AnswerRe: Boolean function to return true/false Pin
Richard MacCutchan30-Dec-12 4:12
mvpRichard MacCutchan30-Dec-12 4: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 4:18
memberMember 970415330-Dec-12 4:18 
GeneralRe: Boolean function to return true/false Pin
Richard MacCutchan30-Dec-12 4:25
mvpRichard MacCutchan30-Dec-12 4:25 
GeneralRe: Boolean function to return true/false Pin
Member 970415330-Dec-12 5:42
memberMember 970415330-Dec-12 5:42 
GeneralRe: Boolean function to return true/false Pin
Richard MacCutchan30-Dec-12 5:45
mvpRichard MacCutchan30-Dec-12 5:45 
AnswerRe: Boolean function to return true/false Pin
Matt T Heffron3-Jan-13 19:54
memberMatt T Heffron3-Jan-13 19:54 
GeneralRe: Boolean function to return true/false Pin
Member 97041533-Jan-13 21:00
memberMember 97041533-Jan-13 21:00 
GeneralRe: Boolean function to return true/false Pin
Member 97041537-Jan-13 9:55
memberMember 97041537-Jan-13 9:55 
AnswerRe: Boolean function to return true/false Pin
Matt T Heffron7-Jan-13 10:17
memberMatt T Heffron7-Jan-13 10:17 
GeneralRe: Boolean function to return true/false Pin
Member 97041537-Jan-13 10:26
memberMember 97041537-Jan-13 10:26 
AnswerRe: Boolean function to return true/false Pin
Matt T Heffron7-Jan-13 11:01
memberMatt T Heffron7-Jan-13 11:01 
GeneralRe: Boolean function to return true/false Pin
Member 97041537-Jan-13 11:30
memberMember 97041537-Jan-13 11:30 
GeneralRe: Boolean function to return true/false Pin
Member 97041537-Jan-13 11:57
memberMember 97041537-Jan-13 11:57 
AnswerRe: Boolean function to return true/false Pin
Matt T Heffron7-Jan-13 12:03
memberMatt T Heffron7-Jan-13 12:03 
GeneralRe: Boolean function to return true/false Pin
Member 97041537-Jan-13 12:12
memberMember 97041537-Jan-13 12:12 
AnswerRe: Boolean function to return true/false Pin
Matt T Heffron7-Jan-13 12:29
memberMatt T Heffron7-Jan-13 12:29 
GeneralRe: Boolean function to return true/false Pin
Member 97041537-Jan-13 12:39
memberMember 97041537-Jan-13 12:39 
GeneralRe: Boolean function to return true/false Pin
Matt T Heffron7-Jan-13 11:57
memberMatt T Heffron7-Jan-13 11:57 
GeneralRe: Boolean function to return true/false Pin
Member 97041537-Jan-13 12:02
memberMember 97041537-Jan-13 12:02 
QuestionC# data tranfer to form in textbox Pin
Member 970663330-Dec-12 2:44
memberMember 970663330-Dec-12 2:44 
AnswerRe: C# data tranfer to form in textbox Pin
Richard MacCutchan30-Dec-12 4:29
mvpRichard MacCutchan30-Dec-12 4:29 
GeneralRe: C# data tranfer to form in textbox Pin
Member 970663330-Dec-12 8:07
memberMember 970663330-Dec-12 8:07 
GeneralRe: C# data tranfer to form in textbox Pin
Richard MacCutchan30-Dec-12 22:10
mvpRichard MacCutchan30-Dec-12 22:10 
AnswerRe: C# data tranfer to form in textbox Pin
BillWoodruff3-Jan-13 17:37
memberBillWoodruff3-Jan-13 17:37 
QuestionHow to solve the following problem using StreamReader. Pin
dr_iton30-Dec-12 0:20
memberdr_iton30-Dec-12 0:20 
AnswerRe: How to solve the following problem using StreamReader. Pin
jibesh30-Dec-12 1:19
memberjibesh30-Dec-12 1:19 
AnswerRe: How to solve the following problem using StreamReader. Pin
Richard MacCutchan30-Dec-12 2:37
mvpRichard MacCutchan30-Dec-12 2:37 
GeneralRe: How to solve the following problem using StreamReader. Pin
dr_iton31-Dec-12 14:38
memberdr_iton31-Dec-12 14:38 
GeneralRe: How to solve the following problem using StreamReader. Pin
Richard MacCutchan31-Dec-12 22:36
mvpRichard MacCutchan31-Dec-12 22:36 
GeneralRe: How to solve the following problem using StreamReader. Pin
dr_iton1-Jan-13 8:58
memberdr_iton1-Jan-13 8:58 
GeneralRe: How to solve the following problem using StreamReader. Pin
Richard MacCutchan1-Jan-13 22:11
mvpRichard MacCutchan1-Jan-13 22:11 
GeneralRe: How to solve the following problem using StreamReader. Pin
dr_iton4-Jan-13 10:17
memberdr_iton4-Jan-13 10:17 
GeneralRe: How to solve the following problem using StreamReader. Pin
Richard MacCutchan5-Jan-13 1:18
mvpRichard MacCutchan5-Jan-13 1:18 
GeneralRe: How to solve the following problem using StreamReader. Pin
dr_iton5-Jan-13 2:58
memberdr_iton5-Jan-13 2:58 
GeneralRe: How to solve the following problem using StreamReader. Pin
Richard MacCutchan5-Jan-13 3:04
mvpRichard MacCutchan5-Jan-13 3:04 
QuestionData in GridView is not being displayed correctly Pin
Member 970415329-Dec-12 11:02
memberMember 970415329-Dec-12 11:02 
AnswerRe: Data in GridView is not being displayed correctly Pin
Lampridis Vasilis29-Dec-12 23:09
memberLampridis Vasilis29-Dec-12 23:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    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.150731.1 | Last Updated 2 Aug 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid