Interface Mirror

Proper Solutions to Software Development Problems

  Home  |   Contact  |   Syndication    |   Login
  18 Posts | 8 Stories | 16 Comments | 1 Trackbacks

News



Article Categories

Archives

Post Categories

Link

Writing data into file system is always desired by developers. It is a kind of requirement that can come to any kind of program. I give more importance to writing into file system using my code because I use this way as a debugging method also.
Following code snippet demonstrates a sample file operation:

using System;
using
System . IO;
using
AGI;
namespace
AsteriskGeeks
{
     public class
Program
     {
         static void Main ( string
[ ] args )
         {
            MonoTone mono = new MonoTone
();
            Keypad key = new Keypad
();
            String input = mono . GetData ( "welcome"
, 10000 , 1 );
            StreamWriter writer = new StreamWriter ( "/var/log/asterisk/Log.txt" , true
);
            writer . WriteLine ("You have entered number : "
+ input );
            writer . Close ();
            mono . HangUp ();
         }
     }
}

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
posted on Tuesday, March 06, 2007 6:42 PM