Click here to Skip to main content
15,888,286 members
Home / Discussions / C#
   

C#

 
QuestionSyncing data between SQL Server 2005 and Velocity (Distributed cache application) Pin
Gans_iitm28-Dec-09 21:03
Gans_iitm28-Dec-09 21:03 
QuestionFTP provider for windows 2008 ftp server Pin
Member 401661628-Dec-09 20:45
Member 401661628-Dec-09 20:45 
QuestionWebDAV Pin
satsumatable28-Dec-09 20:38
satsumatable28-Dec-09 20:38 
AnswerRe: WebDAV Pin
#realJSOP28-Dec-09 23:58
mve#realJSOP28-Dec-09 23:58 
QuestionWith regard to "csexwb" lost in the new tab window document.referrer Pin
590240@qq.com28-Dec-09 20:18
590240@qq.com28-Dec-09 20:18 
AnswerRe: With regard to "csexwb" lost in the new tab window document.referrer Pin
Abhinav S28-Dec-09 20:41
Abhinav S28-Dec-09 20:41 
QuestionTimeout for an operation Pin
faheemnadeem28-Dec-09 19:27
faheemnadeem28-Dec-09 19:27 
AnswerRe: Timeout for an operation Pin
Ben Fair29-Dec-09 3:02
Ben Fair29-Dec-09 3:02 
I believe the System.Threading.Timer class should be able to handle this in relatively little code. This version of the Timer class takes a TimerCallback delegate that it will invoke after the specified amount of time has transpired. You can also configure it via one of the constructor overloads to continue running at a certain interval, or you can have it run only a single time. Last, it takes a state object so you can pass in some data pertaining to the operation you wish to check and that object will be passed in to your delegate. Here's some example code just to illustrate how easy it is to use.

using System.Threading;
...

private Timer _operationTimeout = null;

private void CheckOperation(MyOperationData data, int timeout)
{
    // run this timer a single time...
    _operationTimeout = new Timer(new TimerCallback(CheckValue), data, timeout, Timeout.Infinite);
}
// this method will be called by the timeout timer, once the interval has elapsed
private void CheckValue(object data)
{
    MyOperationData opData = (MyOperationData)data;
    // check the result, if it is not the expected value throw the timeout exception
    if (!opData.Value.Equals(opData.ExpectedValue))
        throw opData.TimeoutException;
}


Hold on a second here... Don't you think you might be putting the horse ahead of the cart?

QuestionInterface Colllection Pin
Isaac Gordon28-Dec-09 19:15
Isaac Gordon28-Dec-09 19:15 
AnswerRe: Interface Colllection Pin
Abhinav S28-Dec-09 19:23
Abhinav S28-Dec-09 19:23 
QuestionDragging to Resize A Control Pin
Roger Wright28-Dec-09 19:09
professionalRoger Wright28-Dec-09 19:09 
AnswerRe: Dragging to Resize A Control Pin
dan!sh 28-Dec-09 19:26
professional dan!sh 28-Dec-09 19:26 
QuestionHello Pin
levan omadze28-Dec-09 19:08
levan omadze28-Dec-09 19:08 
AnswerRe: Hello Pin
Roger Wright28-Dec-09 19:21
professionalRoger Wright28-Dec-09 19:21 
AnswerRe: Hello Pin
dan!sh 28-Dec-09 19:32
professional dan!sh 28-Dec-09 19:32 
QuestionHello Pin
levan omadze28-Dec-09 19:05
levan omadze28-Dec-09 19:05 
QuestionHow to store PIXEL VALUES in ARRAY? Pin
meetmak28-Dec-09 18:54
meetmak28-Dec-09 18:54 
AnswerRe: How to store PIXEL VALUES in ARRAY? Pin
dan!sh 28-Dec-09 19:21
professional dan!sh 28-Dec-09 19:21 
GeneralRe: How to store PIXEL VALUES in ARRAY? Pin
meetmak29-Dec-09 1:14
meetmak29-Dec-09 1:14 
GeneralRe: How to store PIXEL VALUES in ARRAY? Pin
dan!sh 29-Dec-09 3:32
professional dan!sh 29-Dec-09 3:32 
AnswerRe: How to store PIXEL VALUES in ARRAY? Pin
Abhinav S28-Dec-09 19:27
Abhinav S28-Dec-09 19:27 
GeneralRe: How to store PIXEL VALUES in ARRAY? Pin
meetmak29-Dec-09 1:12
meetmak29-Dec-09 1:12 
GeneralRe: How to store PIXEL VALUES in ARRAY? Pin
meetmak29-Dec-09 1:13
meetmak29-Dec-09 1:13 
AnswerRe: How to store PIXEL VALUES in ARRAY? Pin
Keith Barrow29-Dec-09 0:00
professionalKeith Barrow29-Dec-09 0:00 
GeneralRe: How to store PIXEL VALUES in ARRAY? Pin
meetmak29-Dec-09 1:08
meetmak29-Dec-09 1:08 

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.