473,883 Members | 1,669 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

question about multithread c# socket server

Hello:
I write a multithread c# socket server,it is a winform application,the re is a richtextbox control and button,when the button is click,the server begin to listen the socket port,waiting for a incoming connection,the relative code snipprt as following::

private IPAddress myIP=IPAddress. Parse("127.0.0. 1");
private IPEndPoint myServer;
private Socket socket;
private Socket accSocket;
private System.Windows. Forms.Button button2;
private bool check;

private void button1_Click(o bject sender, System.EventArg s e)
{
check=true;
try
{
Thread thread =new Thread(new ThreadStart(acc p));
thread.Start();
}
catch(Exception ee)
{
MessageBox.Show (ee.Message);
}
}

private void accp()
{
myServer=new IPEndPoint(myIP ,Int32.Parse("2 0000"));
socket=new Socket(AddressF amily.InterNetw ork,SocketType. Stream,Protocol Type.Tcp);
socket.Bind(myS erver);
socket.Listen(5 0);

while(true)
{
try
{
accSocket=socke t.Accept();
if(accSocket.Co nnected)
{
Thread thread=new Thread(new ThreadStart(rou nd));
thread.Start();
}
}
catch(Exception ee)
{
MessageBox.Show (ee.Message);
}
}
}

private void round()
{

Byte[] rec=new Byte[1024];
NetworkStream acceptStream=ne w NetworkStream(a ccSocket);

int i=0;
while((i=accept Stream.Read(rec ,0,rec.Length)) !=0)
{
string recMessage=Syst em.Text.Encodin g.Default.GetSt ring(rec);
rec=new Byte[1024];
this.richTextBo x1.AppendText(r ecMessage);
}

}
…………… …………… …………… .
…………… …………… ……………


In order to test the server,I write a multithread client too,there is only one button in the form,when it is clicked,four threads is generated to connect the server simultaneously, each thread write one line to the server socket.code as:

private IPAddress myIP;
private IPEndPoint myServer;
private Socket socket;

private void button1_Click(o bject sender, System.EventArg s e)
{
for(int i=0;i<4;i++)
{
Thread thread=new Thread(new ThreadStart(rou nd));
thread.Start();
thread.Join();
}
}

private void round()
{
try
{
myIP=IPAddress. Parse("127.0.0. 1");
myServer=new IPEndPoint(myIP ,Int32.Parse("2 0000"));
socket=new Socket(AddressF amily.InterNetw ork,SocketType. Stream,Protocol Type.Tcp);
socket.Connect( myServer);
NetworkStream netStream=new NetworkStream(s ocket);

Byte[] byteMessage=new Byte[640];
string sendMessage=" 家好!! !!\r\n";
byteMessage=Sys tem.Text.Encodi ng.Default.GetB ytes(sendMessag e.ToCharArray() );
// socket.Send(byt eMessage,byteMe ssage.Length,0) ;
netStream.Write (byteMessage,0, byteMessage.Len gth);
netStream.Flush ();
netStream.Close ();
socket.Close();
}
catch(Exception ee)
{
MessageBox.Show (ee.Message);
}

}

As you can see,when I click the button in the client side,I should see four lines is printed in the server side.but in fact,I can’t,I can only see one line,sometimes two or three lines,by my tracing,I found they always come from the last several threads.if I modify the button click event in the client as following(add sleep between the threads),it works well,that is I can see four lines every time in the server:
private void button1_Click(o bject sender, System.EventArg s e)
{
for(int i=0;i<4;i++)
{
Thread thread=new Thread(new ThreadStart(rou nd));
thread.Start();
thread.Join();
Thread.Sleep(10 0);
}
}

If I modify the timeout param of the sleep method to lower and lower, the mentioned problem occur again.i also write a java multithread server, it works well to the simuteneous thread connection.
Why c# socket server can’t handle the simultaneous access?is it a bug?by comparing the java server and c# server,I also found that the java server is faster then c# server.

Any instruction?Tha nk you.
Nov 16 '05 #1
4 7096
Hello!

For instance you don't respect that the rich text box may only be dealt with
by the STA thread which created it.

Have you generally considered to use asynchronous sockets instead of your
own explicit thread handling?
Best regards,

Henrik Dahl

"zbcong" <zb****@discuss ions.microsoft. com> wrote in message
news:5C******** *************** ***********@mic rosoft.com...
Hello:
I write a multithread c# socket server,it is a winform application,the re is a richtextbox control and button,when the button is click,the server
begin to listen the socket port,waiting for a incoming connection,the
relative code snipprt as following::
private IPAddress myIP=IPAddress. Parse("127.0.0. 1");
private IPEndPoint myServer;
private Socket socket;
private Socket accSocket;
private System.Windows. Forms.Button button2;
private bool check;

private void button1_Click(o bject sender, System.EventArg s e)
{
check=true;
try
{
Thread thread =new Thread(new ThreadStart(acc p));
thread.Start();
}
catch(Exception ee)
{
MessageBox.Show (ee.Message);
}
}

private void accp()
{
myServer=new IPEndPoint(myIP ,Int32.Parse("2 0000"));
socket=new Socket(AddressF amily.InterNetw ork,SocketType. Stream,Protocol Type.Tcp); socket.Bind(myS erver);
socket.Listen(5 0);

while(true)
{
try
{
accSocket=socke t.Accept();
if(accSocket.Co nnected)
{
Thread thread=new Thread(new ThreadStart(rou nd));
thread.Start();
}
}
catch(Exception ee)
{
MessageBox.Show (ee.Message);
}
}
}

private void round()
{

Byte[] rec=new Byte[1024];
NetworkStream acceptStream=ne w NetworkStream(a ccSocket);

int i=0;
while((i=accept Stream.Read(rec ,0,rec.Length)) !=0)
{
string recMessage=Syst em.Text.Encodin g.Default.GetSt ring(rec);
rec=new Byte[1024];
this.richTextBo x1.AppendText(r ecMessage);
}

}
............... .
...............


In order to test the server,I write a multithread client too,there is only one button in the form,when it is clicked,four threads is generated to
connect the server simultaneously, each thread write one line to the server
socket.code as:
private IPAddress myIP;
private IPEndPoint myServer;
private Socket socket;

private void button1_Click(o bject sender, System.EventArg s e)
{
for(int i=0;i<4;i++)
{
Thread thread=new Thread(new ThreadStart(rou nd));
thread.Start();
thread.Join();
}
}

private void round()
{
try
{
myIP=IPAddress. Parse("127.0.0. 1");
myServer=new IPEndPoint(myIP ,Int32.Parse("2 0000"));
socket=new Socket(AddressF amily.InterNetw ork,SocketType. Stream,Protocol Type.Tcp); socket.Connect( myServer);
NetworkStream netStream=new NetworkStream(s ocket);

Byte[] byteMessage=new Byte[640];
string sendMessage="?? ?!!!!!\r\n";
byteMessage=Sys tem.Text.Encodi ng.Default.GetB ytes(sendMessag e.ToCharArray() )
; // socket.Send(byt eMessage,byteMe ssage.Length,0) ;
netStream.Write (byteMessage,0, byteMessage.Len gth);
netStream.Flush ();
netStream.Close ();
socket.Close();
}
catch(Exception ee)
{
MessageBox.Show (ee.Message);
}

}

As you can see,when I click the button in the client side,I should see four lines is printed in the server side.but in fact,I can't,I can only see
one line,sometimes two or three lines,by my tracing,I found they always come
from the last several threads.if I modify the button click event in the
client as following(add sleep between the threads),it works well,that is I
can see four lines every time in the server:

private void button1_Click(o bject sender, System.EventArg s e)
{
for(int i=0;i<4;i++)
{
Thread thread=new Thread(new ThreadStart(rou nd));
thread.Start();
thread.Join();
Thread.Sleep(10 0);
}
}

If I modify the timeout param of the sleep method to lower and lower, the mentioned problem occur again.i also write a java multithread server, it
works well to the simuteneous thread connection. Why c# socket server can't handle the simultaneous access?is it a bug?by comparing the java server and c# server,I also found that the java server is
faster then c# server.
Any instruction?Tha nk you.

Nov 16 '05 #2
no,it is not the problem of rich text box,if you replace "richTextBox1.A ppendText(recMe ssage)" with "Console.WriteL ine(recMessage) " in the serverside,you can only see ONE line printed every time the button is clicked,why?





"Henrik Dahl" wrote:
Hello!

For instance you don't respect that the rich text box may only be dealt with
by the STA thread which created it.

Have you generally considered to use asynchronous sockets instead of your
own explicit thread handling?
Best regards,

Henrik Dahl

"zbcong" <zb****@discuss ions.microsoft. com> wrote in message
news:5C******** *************** ***********@mic rosoft.com...
Hello:
I write a multithread c# socket server,it is a winform application,the re

is a richtextbox control and button,when the button is click,the server
begin to listen the socket port,waiting for a incoming connection,the
relative code snipprt as following::

private IPAddress myIP=IPAddress. Parse("127.0.0. 1");
private IPEndPoint myServer;
private Socket socket;
private Socket accSocket;
private System.Windows. Forms.Button button2;
private bool check;

private void button1_Click(o bject sender, System.EventArg s e)
{
check=true;
try
{
Thread thread =new Thread(new ThreadStart(acc p));
thread.Start();
}
catch(Exception ee)
{
MessageBox.Show (ee.Message);
}
}

private void accp()
{
myServer=new IPEndPoint(myIP ,Int32.Parse("2 0000"));
socket=new

Socket(AddressF amily.InterNetw ork,SocketType. Stream,Protocol Type.Tcp);
socket.Bind(myS erver);
socket.Listen(5 0);

while(true)
{
try
{
accSocket=socke t.Accept();
if(accSocket.Co nnected)
{
Thread thread=new Thread(new ThreadStart(rou nd));
thread.Start();
}
}
catch(Exception ee)
{
MessageBox.Show (ee.Message);
}
}
}

private void round()
{

Byte[] rec=new Byte[1024];
NetworkStream acceptStream=ne w NetworkStream(a ccSocket);

int i=0;
while((i=accept Stream.Read(rec ,0,rec.Length)) !=0)
{
string recMessage=Syst em.Text.Encodin g.Default.GetSt ring(rec);
rec=new Byte[1024];
this.richTextBo x1.AppendText(r ecMessage);
}

}
............... .
...............


In order to test the server,I write a multithread client too,there is only

one button in the form,when it is clicked,four threads is generated to
connect the server simultaneously, each thread write one line to the server
socket.code as:

private IPAddress myIP;
private IPEndPoint myServer;
private Socket socket;

private void button1_Click(o bject sender, System.EventArg s e)
{
for(int i=0;i<4;i++)
{
Thread thread=new Thread(new ThreadStart(rou nd));
thread.Start();
thread.Join();
}
}

private void round()
{
try
{
myIP=IPAddress. Parse("127.0.0. 1");
myServer=new IPEndPoint(myIP ,Int32.Parse("2 0000"));
socket=new

Socket(AddressF amily.InterNetw ork,SocketType. Stream,Protocol Type.Tcp);
socket.Connect( myServer);
NetworkStream netStream=new NetworkStream(s ocket);

Byte[] byteMessage=new Byte[640];
string sendMessage="?? ?!!!!!\r\n";

byteMessage=Sys tem.Text.Encodi ng.Default.GetB ytes(sendMessag e.ToCharArray() )
;
// socket.Send(byt eMessage,byteMe ssage.Length,0) ;
netStream.Write (byteMessage,0, byteMessage.Len gth);
netStream.Flush ();
netStream.Close ();
socket.Close();
}
catch(Exception ee)
{
MessageBox.Show (ee.Message);
}

}

As you can see,when I click the button in the client side,I should see

four lines is printed in the server side.but in fact,I can't,I can only see
one line,sometimes two or three lines,by my tracing,I found they always come
from the last several threads.if I modify the button click event in the
client as following(add sleep between the threads),it works well,that is I
can see four lines every time in the server:


private void button1_Click(o bject sender, System.EventArg s e)
{
for(int i=0;i<4;i++)
{
Thread thread=new Thread(new ThreadStart(rou nd));
thread.Start();
thread.Join();
Thread.Sleep(10 0);
}
}

If I modify the timeout param of the sleep method to lower and lower, the

mentioned problem occur again.i also write a java multithread server, it
works well to the simuteneous thread connection.
Why c# socket server can't handle the simultaneous access?is it a bug?by

comparing the java server and c# server,I also found that the java server is
faster then c# server.

Any instruction?Tha nk you.


Nov 16 '05 #3
zbcong wrote:
no,it is not the problem of rich text box,if you replace "richTextBox1.A ppendText(recMe ssage)" with "Console.WriteL ine(recMessage) " in the serverside,you can only see ONE line printed every time the button is clicked,why?
No, it is not the problem of the rich text box. As the previous response
said, it is the problem of thread safety. The RTB is not threadsafe, and
must be updated in the thread that created the RTB only.
Console.WriteLi ne() is threadsafe. Thus you get what you expect. What
you need is a way to update in the creating thread:
class MyForm:Form
{
public void Append(String msg)
{
if( InvokeRequired )
BeginInvoke(new MyDelegate(Invo kedAppendFunc),
new object[] {msg});
else
DoAppend(msg);
}
private void InvokedAppendFu nc(String msg)
{
DoAppend(msg);
}
private void DoAppend(String msg)
{
richtextbox1.Ap pend(msg);
}

A simple locking wouldn't work:
lock(richtextbo x1)
richtextbox1.Ap pend(msg);

because none of the code in the RTB does this, and you need threadsafety
support to make it work. So the above Invoke procedure is the only way.

Also, consider the previous posters async socket suggestion. It uses
threads under the covers, and you do not need any explicit thread
management (other than remembering you are in a subthread and need to
keep thread safety in mind.)

David Logan




"Henrik Dahl" wrote:

Hello!

For instance you don't respect that the rich text box may only be dealt with
by the STA thread which created it.

Have you generally considered to use asynchronous sockets instead of your
own explicit thread handling?
Best regards,

Henrik Dahl

"zbcong" <zb****@discuss ions.microsoft. com> wrote in message
news:5C****** *************** *************@m icrosoft.com...
Hello:
I write a multithread c# socket server,it is a winform application,the re


is a richtextbox control and button,when the button is click,the server
begin to listen the socket port,waiting for a incoming connection,the
relative code snipprt as following::
private IPAddress myIP=IPAddress. Parse("127.0.0. 1");
private IPEndPoint myServer;
private Socket socket;
private Socket accSocket;
private System.Windows. Forms.Button button2;
private bool check;

private void button1_Click(o bject sender, System.EventArg s e)
{
check=true ;
try
{
Thread thread =new Thread(new ThreadStart(acc p));
thread.Start ();
}
catch(Except ion ee)
{
MessageBox.S how(ee.Message) ;
}
}

private void accp()
{
myServer=n ew IPEndPoint(myIP ,Int32.Parse("2 0000"));
socket=new


Socket(Addres sFamily.InterNe twork,SocketTyp e.Stream,Protoc olType.Tcp);
socket.Bind( myServer);
socket.Liste n(50);

while(true )
{
try
{
accSocket=so cket.Accept();
if(accSocket .Connected)
{
Thread thread=new Thread(new ThreadStart(rou nd));
thread.Start ();
}
}
catch(Except ion ee)
{
MessageBox.S how(ee.Message) ;
}
}
}

private void round()
{

Byte[] rec=new Byte[1024];
NetworkStrea m acceptStream=ne w NetworkStream(a ccSocket);

int i=0;
while((i=acc eptStream.Read( rec,0,rec.Lengt h))!=0)
{
string recMessage=Syst em.Text.Encodin g.Default.GetSt ring(rec);
rec=new Byte[1024];
this.richTex tBox1.AppendTex t(recMessage);
}

}
............ ....
............ ...


In order to test the server,I write a multithread client too,there is only


one button in the form,when it is clicked,four threads is generated to
connect the server simultaneously, each thread write one line to the server
socket.code as:


private IPAddress myIP;
private IPEndPoint myServer;
private Socket socket;

private void button1_Click(o bject sender, System.EventArg s e)
{
for(int i=0;i<4;i++)
{
Thread thread=new Thread(new ThreadStart(rou nd));
thread.Start ();
thread.Join( );
}
}

private void round()
{
try
{
myIP=IPAddre ss.Parse("127.0 .0.1");
myServer=n ew IPEndPoint(myIP ,Int32.Parse("2 0000"));
socket=new


Socket(Addres sFamily.InterNe twork,SocketTyp e.Stream,Protoc olType.Tcp);
socket.Conne ct(myServer);
NetworkStrea m netStream=new NetworkStream(s ocket);

Byte[] byteMessage=new Byte[640];
string sendMessage="?? ?!!!!!\r\n";


byteMessage=S ystem.Text.Enco ding.Default.Ge tBytes(sendMess age.ToCharArray ())
;
// socket.Send(byt eMessage,byteMe ssage.Length,0) ;
netStream.Wr ite(byteMessage ,0,byteMessage. Length);
netStream.Fl ush();
netStream.Cl ose();
socket.Close ();
}
catch(Except ion ee)
{
MessageBox.S how(ee.Message) ;
}

}

As you can see,when I click the button in the client side,I should see


four lines is printed in the server side.but in fact,I can't,I can only see
one line,sometimes two or three lines,by my tracing,I found they always come
from the last several threads.if I modify the button click event in the
client as following(add sleep between the threads),it works well,that is I
can see four lines every time in the server:

private void button1_Click(o bject sender, System.EventArg s e)
{
for(int i=0;i<4;i++)
{
Thread thread=new Thread(new ThreadStart(rou nd));
thread.Start ();
thread.Join( );
Thread.Sleep (100);
}
}

If I modify the timeout param of the sleep method to lower and lower, the


mentioned problem occur again.i also write a java multithread server, it
works well to the simuteneous thread connection.
Why c# socket server can't handle the simultaneous access?is it a bug?by


comparing the java server and c# server,I also found that the java server is
faster then c# server.
Any instruction?Tha nk you.


Nov 16 '05 #4
Hi,

I haven't worked with sockets, but your server is not thread safe at
all.

Please, read inline:


private void accp()
{
myServer=new IPEndPoint(myIP ,Int32.Parse("2 0000"));
socket=new Socket(AddressF amily.InterNetw ork,SocketType. Stream,Protocol Type.Tcp);
socket.Bind(myS erver);
socket.Listen(5 0);

while(true)
{
try
{
accSocket=socke t.Accept();
1. now here you set a field variable accSocket to the current accepted
socket. And start a thread which deals it that variable. And then you go
to grab the next accepted socket. And you may get it even before the
working thread is started. And you replace the same variable, so the
working method in the started thread will see the new connected socket,
not the previous one, for which was started.
if(accSocket.Co nnected)
{
Thread thread=new Thread(new ThreadStart(rou nd));
thread.Start();
}
}
catch(Exception ee)
{
MessageBox.Show (ee.Message);
}
}
}

private void round()
{

Byte[] rec=new Byte[1024];
NetworkStream acceptStream=ne w NetworkStream(a ccSocket);
??? what exact connection you are dealing with here? With this
implementation you are always using the last accepted one in the other
thread.


int i=0;
while((i=accept Stream.Read(rec ,0,rec.Length)) !=0)
{
string recMessage=Syst em.Text.Encodin g.Default.GetSt ring(rec);
rec=new Byte[1024];
this.richTextBo x1.AppendText(r ecMessage);
}

}


You can make your server thread safe either by using the async socket
handling, by something like this:
class SocketReadingTh read
{
private readonly Socket accSocket;

public SocketReadingTh read(Socket acceptedSocket)
{
this.accSocket = acceptedSocket;
}

public void Rount()
{
..... your implementation goes here
}
}

There is a possible memory leak as well, I do not see where you close
the accepted socket or the NetworkStream.

Also, as others have mentioned, you can not write directly in the RTB
from different threads. All windows controls are not thread safe. You
have to use the Invoke method from the threads, so the writing is
correct.

Ion Skeet has a wonderful article about threads. I wish he had wrote 1
year ago ... :)

http://www.yoda.arachsys.com/csharp/multithreading.html

Sunny
Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2170
by: 0to60 | last post by:
I have a question about socket programming in general. Exactly what happens behind the scenes when I one socket connects to a different socket in listen mode? Using the dotnet framework, I create a socket, bind it to a port, put it in listen mode, and then n sockets can connect to it. The code: Socket newSocket = listeningSocket.Accept(); returns a socket. I can communicate on newSocket, and listeningSocket goes
2
26532
by: zhebincong | last post by:
Hello: I write a multithread c# socket server,it is a winform application,there is a richtextbox control and button,when the button is click,the server begin to listen the socket port,waiting for a incoming connection,the relative code snipprt as following:: private IPAddress myIP=IPAddress.Parse("127.0.0.1");
1
3406
by: John Sheppard | last post by:
Thanks to everyone that responded to my previous Socket Programming question. Now I have run into some behavior that I don't quite understand. Programming environment. VS.NET 2003, C#, Windows XP. About the architecture: I have a socket server dll that contains a class that handles connections for a given local ipaddress and port. This class(server) can be started or stopped by calls to the appropriate functions. The server class has...
5
4647
by: Naveen Mukkelli | last post by:
Hi all, How can we use "NUnit" in socket programming. I mean, I'm writing a server program which accepts connection requests from the clients. I want to test the number of clients whenever a new connection is established. My Server code is : ---------------------------------------------------------------------
4
2206
by: Crirus | last post by:
hello I need a sample of a server with multithreading accept connections with sockets... Have anyone? Thanks, Crirus
2
15338
by: djc | last post by:
I read a network programming book (based on framework 1.1) which indicated that you should 'never' use the RecieveTimeout or the SendTimeout 'socket options' on TCP sockets or you may loose data. I now see the socket.RecieveTimeout 'property' in the visual studio 2005 help documentation (framework 2.0) and it has example of it being used with TCP socket. This propery is also listed as 'new in .net 2.0'. 1) is the socket.RecieveTimeout...
4
3611
by: Engineerik | last post by:
I am trying to create a socket server which will listen for connections from multiple clients and call subroutines in a Fortran DLL and pass the results back to the client. The asynchronous socket client and asynchronous socket server example code provided in the .NET framework developers guide is a great start but I have not dealt with sockets before and I am struggling with something. From what I can tell the sample server code ...
2
4355
by: Dave Dean | last post by:
Hi all, I'm just starting out in sockets/network programming, and I have a very basic question...what are the 'security' implications of opening up a socket? For example, suppose I've written a simple chat server and chat client. The server opens a socket, listens on a port, and accepts incoming connections. The clients open a socket and connect to the server. If the server receives a message from a client, it sends that message out to...
2
2100
by: Ali Hamad | last post by:
Hello All : A socket question from a networking newbie. I need to create a server that: 1) receive a message from client. 2) check that message and response to it. 3) the client get the server message and send another message. 4) finally, the server receive the message and close the connection.
0
9940
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9792
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11141
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9573
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7971
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7126
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5991
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4611
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4220
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.