Saturday, February 26, 2011

Write A Line to a file


using System;
using System.IO;

public class WriteFileStuff {

public static void Main() {
       FileStream fs = new FileStream("c:\\tmp\\WriteFileStuff.txt", FileMode.OpenOrCreate, FileAccess.Write);   
       StreamWriter sw = new StreamWriter(fs);
      

Read File Using Streams


public static string getFileAsString(string fileName) {
   StreamReader sReader = null;
   string contents = null;
   try {
      FileStream fileStream = new FileStream(fileName, FileMode.Open, FileAccess.Read);
      sReader = new StreamReader(fileStream);
      

Read Data From File


Read Entire File ...
using System;
namespace PlayingAround {
    class ReadAll {
        public static void Main(string[] args) {

Tuesday, February 1, 2011

How to Print data In GUI


Print data In Windows application
private void cmdprint_Click(object sender, EventArgs e)
        {

            // Create the document and attach an event handler.
            PrintDocument doc = new PrintDocument();

AngularJS Basics - Part 1

                                                                  AngularJS What is AngularJS ·          Framework by googl...