> Hi,
> I have a program prog.exe. which takes IP as input its owner
> information as output.
> if input.txt contains,
<snip>
> Now if I use input redirection operator
> c:\> prog.exe < input.txt
[quoted text clipped - 5 lines]
> I want my program should process all the input and output the data
> then exit. no wait.
The way your program is built, it should exit out of the loop when it
hits the end of the data.
The correct way to end the program is to hit Ctrl+Z when you're giving
it text from the console.
When you give it text from a file, or from a different program, it
should terminate by its own.
However, you haven't shown what "startProcess" does, so there could be
other things that holds your program up.
Try the following simple program and see if it behaves as you expect:
using System;
namespace ConsoleApplication1
{
class Program
{
static void Main(String[] args)
{
while (true)
{
String s = Console.In.ReadLine();
if (s == null)
break;
Console.Out.WriteLine(s);
}
}
}
}

Signature
Lasse Vågsæther Karlsen
mailto:lasse@vkarlsen.no
http://presentationmode.blogspot.com/
PGP KeyID: 0xBCDEA2E3
muquaddim@gmail.com - 05 Apr 2008 18:36 GMT
> muquad...@gmail.com wrote:
> > Hi,
[quoted text clipped - 50 lines]
> mailto:la...@vkarlsen.nohttp://presentationmode.blogspot.com/
> PGP KeyID: 0xBCDEA2E3
Thanks Lasse.
I didnt see your solution as I didn't refresh the page.
Whatever thanks again
On Apr 5, 10:53 am, "muquad...@gmail.com" <muquad...@gmail.com> wrote:
> Hi,
> I have a program prog.exe. which takes IP as input its owner
[quoted text clipped - 40 lines]
>
> Thanks in Advance.
its solved
while((ip=Console.ReadLine())!=null){
process(ip);
}
so easy