Cloud Computing

Wednesday, July 8, 2009


A good article on cloud computing,

Cloud Computing


www.codecollege.NET

How to read and write from a text file using c#.net ?

See the following sample,

using System;
using System.Collections.Generic;
using System.Text;
using System.IO;

namespace ReadWriteFromTxt
{
class Program
{
static void readFile()
{
FileStream fsEmp = new FileStream("c:\\Emp.html", FileMode.Open, FileAccess.Read);
StreamReader srEmp = new StreamReader(fsEmp);
string s;
while ((s = srEmp.ReadLine()) != null)
{
Console.WriteLine(s);
Console.Read();
}
srEmp.Close();
fsEmp.Close();
}

static void writeFile()
{
FileStream fsEmp = new FileStream("c:\\Emp.html", FileMode.Open, FileAccess.Write );
StreamWriter swEmp = new StreamWriter(fsEmp );

string s="Have you seen god? Is there anything else to see";
swEmp.WriteLine(s);
swEmp.Close();
fsEmp.Close();

}


static void Main(string[] args)
{
writeFile();
readFile();
}
}
}
www.codecollege.NET

what are the Differences between Abstract Class and Interface ?




























Sno Abstract
Class
Interface
1 Can have implemented Methods Cant
2 A class can inherit only one abstract class A Class can implement any number of Interfaces.
3 We go for Abstract classes on such situations
where we need to give common functionality for group of related classes
We go for Interface on such situations where we
need to give common functionality for group of un-related classes
4 If you add a new method, then you can provide a
default implementation and so no need to make any change to existing work.
If you add a new method, then you need to change
all the existing work.
5
Static and Instance constants are possible.
Only
Static  constants are possible.


www.codecollege.NET

World No 1 kaspersky Antivirus Free for 6 Months


kaspersky-antivirus2010-get-6-months

What are the Differences between Server.Transfer and Response.Redirect ?

Tuesday, July 7, 2009

Difference between Server.Transfer and Response.Redirect

























Sno Server.Transfer Response.Redirect
1 The navigation happens on the server-side ,so client history is not updated The navigation happens on the client-side ,so client history is  updated
2 Data can be persist accros the pages using Context.Item collection Context.Items loses the persisitance.
3 No Round-trips Makes a Round-trip
4 Has Good encapsulation No

LinkWithin

Blog Widget by LinkWithin

Recommended Books