Click here to Skip to main content
15,895,084 members
Home / Discussions / C#
   

C#

 
GeneralRe: Cointegration code for C# - not Silverlight Pin
lordoftrades15-Sep-13 22:16
lordoftrades15-Sep-13 22:16 
GeneralRe: Cointegration code for C# - not Silverlight Pin
Pete O'Hanlon15-Sep-13 22:40
mvePete O'Hanlon15-Sep-13 22:40 
QuestionHow to generate barcode and qrcode dynamically? Pin
Sahyadri3112-Sep-13 20:51
Sahyadri3112-Sep-13 20:51 
AnswerRe: How to generate barcode and qrcode dynamically? Pin
Richard MacCutchan12-Sep-13 21:54
mveRichard MacCutchan12-Sep-13 21:54 
AnswerRe: How to generate barcode and qrcode dynamically? Pin
AngloThaiSolutions7-Oct-13 4:17
AngloThaiSolutions7-Oct-13 4:17 
QuestionConverting a date format Pin
MarkB12312-Sep-13 2:10
MarkB12312-Sep-13 2:10 
AnswerRe: Converting a date format Pin
MarkB12312-Sep-13 2:30
MarkB12312-Sep-13 2:30 
AnswerRe: Converting a date format Pin
V.12-Sep-13 2:56
professionalV.12-Sep-13 2:56 
GeneralRe: Converting a date format Pin
MarkB12312-Sep-13 3:08
MarkB12312-Sep-13 3:08 
GeneralRe: Converting a date format Pin
V.12-Sep-13 3:16
professionalV.12-Sep-13 3:16 
QuestionAuto Connect SQLConnection Pin
Midnight Ahri12-Sep-13 0:06
Midnight Ahri12-Sep-13 0:06 
SuggestionRe: Auto Connect SQLConnection Pin
Richard MacCutchan12-Sep-13 0:19
mveRichard MacCutchan12-Sep-13 0:19 
QuestionRe: Auto Connect SQLConnection Pin
Midnight Ahri12-Sep-13 3:27
Midnight Ahri12-Sep-13 3:27 
AnswerRe: Auto Connect SQLConnection Pin
Richard MacCutchan12-Sep-13 3:32
mveRichard MacCutchan12-Sep-13 3:32 
AnswerRe: Auto Connect SQLConnection Pin
Midnight Ahri12-Sep-13 5:07
Midnight Ahri12-Sep-13 5:07 
QuestionRe: Auto Connect SQLConnection Pin
Midnight Ahri13-Sep-13 13:57
Midnight Ahri13-Sep-13 13:57 
AnswerRe: Auto Connect SQLConnection Pin
Richard MacCutchan13-Sep-13 22:05
mveRichard MacCutchan13-Sep-13 22:05 
AnswerRe: Auto Connect SQLConnection Pin
Midnight Ahri14-Sep-13 20:12
Midnight Ahri14-Sep-13 20:12 
AnswerRe: Auto Connect SQLConnection Pin
Pete O'Hanlon12-Sep-13 5:18
mvePete O'Hanlon12-Sep-13 5:18 
AnswerRe: Auto Connect SQLConnection Pin
Midnight Ahri12-Sep-13 5:36
Midnight Ahri12-Sep-13 5:36 
Thank you very much, I'm new to task and just found it today.
But I'll keep searching.

After calling OpenAsync, State must return Connecting until the returned Task is completed. Then, if the connection was successful, State must return Open. If the connection fails, State must return Closed.


Sorry that english is not my first language and I'm not that good in programming.
So what I understand above is like this.

C#
this.cnn.OpenASync();

if (this.cnn.State == ConnectionState.Connecting)
{
    //cnn is busy connecting
}

Then if it's busy, then I will return; instead of OpenASync() again.
C#
if (this.cnn.State == ConnectionState.Closed)
{
    //cnn failed to open
}


And if it's closed, then I assume cnn failed and finished processing.

But it's not working.

It's ok, I'll search about task.
Thank you very much btw. Smile | :)
QuestionRe: Auto Connect SQLConnection Pin
Midnight Ahri12-Sep-13 6:45
Midnight Ahri12-Sep-13 6:45 
AnswerRe: Auto Connect SQLConnection Pin
Pete O'Hanlon12-Sep-13 8:13
mvePete O'Hanlon12-Sep-13 8:13 
QuestionRe: Auto Connect SQLConnection Pin
Midnight Ahri12-Sep-13 19:36
Midnight Ahri12-Sep-13 19:36 
QuestionRunning SQL Server 2008 R2 without user interaction Pin
WaseemAmin11-Sep-13 21:49
WaseemAmin11-Sep-13 21:49 
AnswerRe: Running SQL Server 2008 R2 without user interaction Pin
Richard MacCutchan11-Sep-13 22:26
mveRichard MacCutchan11-Sep-13 22:26 

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.