Click here to Skip to main content
15,885,278 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# Pin
Guffa9-Sep-05 21:24
Guffa9-Sep-05 21:24 
AnswerRe: C# Pin
Matt Gerrans10-Sep-05 20:05
Matt Gerrans10-Sep-05 20:05 
QuestionHow can i Find String in DataTable or DataSet. Pin
Member 18215449-Sep-05 18:57
Member 18215449-Sep-05 18:57 
AnswerRe: How can i Find String in DataTable or DataSet. Pin
enjoycrack9-Sep-05 19:16
enjoycrack9-Sep-05 19:16 
GeneralRe: How can i Find String in DataTable or DataSet. Pin
Member 182154410-Sep-05 17:08
Member 182154410-Sep-05 17:08 
QuestionFound incredible notepad like source editor Pin
Heinz_9-Sep-05 18:06
Heinz_9-Sep-05 18:06 
QuestionThreads, Socket and StateObject Pin
tekken229-Sep-05 16:31
tekken229-Sep-05 16:31 
AnswerRe: Threads, Socket and StateObject Pin
S. Senthil Kumar9-Sep-05 22:15
S. Senthil Kumar9-Sep-05 22:15 
It's just a convenient place holder for something that you want to pass to the callback function. Whatever is passed in the state object can be retrieved inside the callback using the IAsyncResult.AsyncState property. For example
void Start()
{
   string test = "Senthil rocks";
   s2.BeginReceive(so2.buffer, 0, StateObject.BUFFER_SIZE,0,
                      new AsyncCallback(Async_Send_Receive.Read_Callback), test);
}

void Async_Send_Receive.Read_Callback(IAsyncResult result)
{
   string s = (string)result.AsyncState; // will be "Senthil Rocks"
}

You'll usually pass something more useful, such as the socket object on which you will call EndReceive.

Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
GeneralRe: Threads, Socket and StateObject Pin
tekken2210-Sep-05 4:12
tekken2210-Sep-05 4:12 
GeneralRe: Threads, Socket and StateObject Pin
S. Senthil Kumar10-Sep-05 4:40
S. Senthil Kumar10-Sep-05 4:40 
QuestionMath troubles Pin
KaptinKrunch9-Sep-05 15:02
KaptinKrunch9-Sep-05 15:02 
AnswerRe: Math troubles Pin
S. Senthil Kumar9-Sep-05 22:19
S. Senthil Kumar9-Sep-05 22:19 
AnswerRe: Math troubles Pin
Member 19610719-Sep-05 23:04
Member 19610719-Sep-05 23:04 
AnswerRe: Math troubles Pin
Andy Brummer10-Sep-05 6:33
sitebuilderAndy Brummer10-Sep-05 6:33 
AnswerRe: Math troubles Pin
KaptinKrunch10-Sep-05 8:39
KaptinKrunch10-Sep-05 8:39 
GeneralRe: Math troubles Pin
leppie10-Sep-05 10:04
leppie10-Sep-05 10:04 
QuestionRowCount of a DataTable Pin
surfman199-Sep-05 14:14
surfman199-Sep-05 14:14 
AnswerRe: RowCount of a DataTable Pin
Expert Coming9-Sep-05 14:18
Expert Coming9-Sep-05 14:18 
GeneralRe: RowCount of a DataTable Pin
Andy Brummer9-Sep-05 14:49
sitebuilderAndy Brummer9-Sep-05 14:49 
AnswerRe: RowCount of a DataTable Pin
Gary Thom9-Sep-05 14:19
Gary Thom9-Sep-05 14:19 
AnswerRe: RowCount of a DataTable Pin
surfman199-Sep-05 14:20
surfman199-Sep-05 14:20 
QuestionDeserialize Error Pin
dicas9-Sep-05 13:50
dicas9-Sep-05 13:50 
AnswerRe: Deserialize Error Pin
Guffa9-Sep-05 13:56
Guffa9-Sep-05 13:56 
GeneralRe: Deserialize Error Pin
Daniel132410-Sep-05 2:21
Daniel132410-Sep-05 2:21 
QuestionHow to make DebugView see my program Pin
Susan Hernandez9-Sep-05 12:37
Susan Hernandez9-Sep-05 12:37 

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.