<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://performiq.com/kb/index.php?action=history&amp;feed=atom&amp;title=CSharp_-_Files</id>
	<title>CSharp - Files - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://performiq.com/kb/index.php?action=history&amp;feed=atom&amp;title=CSharp_-_Files"/>
	<link rel="alternate" type="text/html" href="https://performiq.com/kb/index.php?title=CSharp_-_Files&amp;action=history"/>
	<updated>2026-05-18T11:39:54Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://performiq.com/kb/index.php?title=CSharp_-_Files&amp;diff=3922&amp;oldid=prev</id>
		<title>PeterHarding: Created page with &quot;=Notes=   Also see - http://msdn.microsoft.com/en-us/library/system.io.file.aspx  &lt;pre&gt; using System; using System.IO;  class Test {     public static void Main()     {       ...&quot;</title>
		<link rel="alternate" type="text/html" href="https://performiq.com/kb/index.php?title=CSharp_-_Files&amp;diff=3922&amp;oldid=prev"/>
		<updated>2012-12-06T12:38:34Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;=Notes=   Also see - http://msdn.microsoft.com/en-us/library/system.io.file.aspx  &amp;lt;pre&amp;gt; using System; using System.IO;  class Test {     public static void Main()     {       ...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=Notes= &lt;br /&gt;
&lt;br /&gt;
Also see - http://msdn.microsoft.com/en-us/library/system.io.file.aspx&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
using System;&lt;br /&gt;
using System.IO;&lt;br /&gt;
&lt;br /&gt;
class Test&lt;br /&gt;
{&lt;br /&gt;
    public static void Main()&lt;br /&gt;
    {&lt;br /&gt;
        string path = @&amp;quot;c:\temp\Test.txt&amp;quot;;&lt;br /&gt;
        if (!File.Exists(path))&lt;br /&gt;
        {&lt;br /&gt;
            // Create a file to write to. &lt;br /&gt;
            using (StreamWriter sw = File.CreateText(path))&lt;br /&gt;
            {&lt;br /&gt;
                sw.WriteLine(&amp;quot;Hello World&amp;quot;);&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        // Open the file to read from. &lt;br /&gt;
        using (StreamReader sr = File.OpenText(path))&lt;br /&gt;
        {&lt;br /&gt;
            string s = &amp;quot;&amp;quot;;&lt;br /&gt;
            while ((s = sr.ReadLine()) != null)&lt;br /&gt;
            {&lt;br /&gt;
                Console.WriteLine(s);&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:CSharp]]&lt;/div&gt;</summary>
		<author><name>PeterHarding</name></author>
	</entry>
</feed>