Click here to Skip to main content
15,881,248 members
Home / Discussions / C#
   

C#

 
AnswerRe: Regular Expressions Pin
agent00zelda23-Mar-09 10:02
agent00zelda23-Mar-09 10:02 
Questionhelp me in this program Pin
Nettai20-Mar-09 22:48
Nettai20-Mar-09 22:48 
AnswerRe: help me in this program Pin
Xmen Real 20-Mar-09 23:02
professional Xmen Real 20-Mar-09 23:02 
AnswerRe: help me in this program Pin
Nettai20-Mar-09 23:40
Nettai20-Mar-09 23:40 
GeneralRe: help me in this program Pin
Xmen Real 21-Mar-09 1:30
professional Xmen Real 21-Mar-09 1:30 
AnswerRe: help me in this program Pin
dan!sh 21-Mar-09 1:21
professional dan!sh 21-Mar-09 1:21 
QuestionClient in C# Pin
mrithula820-Mar-09 21:38
mrithula820-Mar-09 21:38 
AnswerRe: Client in C# Pin
mrithula823-Mar-09 20:50
mrithula823-Mar-09 20:50 
Hi I had a try with array of the port values. I have used an index that maps the directories to ports.I am stuck at a point.Since i am using the for loop it works well for i=0. i=1 should not execute before the server at C:\projects\ports\10001 starts.How can change this?Is there any loop construct that could help me perform this task?i should get incremented and do the same after the 2nd server starts.Can you please give your suggestions.I tried with break but still im not getting it right.
int[] a = new int[2];
                XmlTextReader xtr1 = new XmlTextReader("p1.xml");
                XmlTextReader xtr2 = new XmlTextReader("p2.xml");
                int p1=0,p2=0;
                while (xtr1.Read())
                {
                    switch (xtr1.NodeType)
                    {
                        case XmlNodeType.Text:

                            String rv = xtr1.Value;
                            p1 = Convert.ToInt32(rv);
                            break;
                    }
                }

                while (xtr2.Read())
                {
                    switch (xtr2.NodeType)
                    {
                        case XmlNodeType.Text:

                            String rv1 = xtr2.Value;
                            p2 = Convert.ToInt32(rv1);
                            break;
                    }
                }
                a[0] = p1;
                a[1] = p2;

                listBox6.Items.Add("Connecting....");
                for (int i = 0; i <= 1; i++)
                {
                    UdpClient client = new UdpClient("127.0.0.1", a[i]);

                    listBox6.Items.Add("Connected");
                    Byte[] data = new Byte[256];
                    String snd = "hello";
                    data = Encoding.ASCII.GetBytes(snd);
                    IPEndPoint ipep = new IPEndPoint(IPAddress.Parse("127.0.0.1"), a[i]);
                    int n = client.Send(data, data.Length);
                    listBox6.Items.Add("Sent...");
                    listBox6.Items.Add("Message received from {0}:");
                    listBox6.Items.Add(ipep.ToString());
                    Byte[] received = new Byte[512];
                    received = client.Receive(ref ipep);
                    String dataReceived = System.Text.Encoding.ASCII.GetString(received);
                    listBox6.Items.Add(dataReceived);

QuestionRemote Desktop Monitoring Pin
sanju_thomas20-Mar-09 20:32
sanju_thomas20-Mar-09 20:32 
AnswerRe: Remote Desktop Monitoring Pin
Xmen Real 20-Mar-09 22:56
professional Xmen Real 20-Mar-09 22:56 
QuestionC#.windows application Problem Pin
varun.g20-Mar-09 20:22
varun.g20-Mar-09 20:22 
AnswerRe: C#.windows application Problem [modified] Pin
dan!sh 20-Mar-09 22:27
professional dan!sh 20-Mar-09 22:27 
GeneralRe: C#.windows application Problem Pin
Xmen Real 20-Mar-09 23:08
professional Xmen Real 20-Mar-09 23:08 
GeneralRe: C#.windows application Problem Pin
dan!sh 21-Mar-09 1:07
professional dan!sh 21-Mar-09 1:07 
AnswerRe: C#.windows application Problem Pin
varun.g21-Mar-09 0:27
varun.g21-Mar-09 0:27 
QuestionIdle processing Pin
saksp20-Mar-09 20:10
saksp20-Mar-09 20:10 
AnswerRe: Idle processing Pin
12Code20-Mar-09 20:30
12Code20-Mar-09 20:30 
AnswerRe: Idle processing Pin
Dominik Reichl21-Mar-09 1:40
Dominik Reichl21-Mar-09 1:40 
QuestionMedia Player Pin
Jahmelon20-Mar-09 19:44
Jahmelon20-Mar-09 19:44 
AnswerRe: Media Player Pin
N a v a n e e t h20-Mar-09 19:57
N a v a n e e t h20-Mar-09 19:57 
GeneralRe: Media Player Pin
Jahmelon20-Mar-09 20:06
Jahmelon20-Mar-09 20:06 
AnswerRe: Media Player Pin
varun.g20-Mar-09 20:21
varun.g20-Mar-09 20:21 
Questionstore excel in sql data base Pin
Mangesh Tomar20-Mar-09 19:29
Mangesh Tomar20-Mar-09 19:29 
AnswerRe: store excel in sql data base Pin
N a v a n e e t h20-Mar-09 19:35
N a v a n e e t h20-Mar-09 19:35 
GeneralRe: store excel in sql data base Pin
Mangesh Tomar20-Mar-09 19:55
Mangesh Tomar20-Mar-09 19:55 

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.