Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

Edit file C#

using System.IO;

public void EditorialResponse(string fileName, string word, string replacement, string saveFileName)
{
    StreamReader reader = new StreamReader(directory + fileName);
    string input = reader.ReadToEnd();

    using (StreamWriter writer = new StreamWriter(directory + saveFileName, true))
    {
        {
            string output = input.Replace(word, replacement);
            writer.Write(output);                     
        }
        writer.Close();
    }
}

//Thanks to Michael on StackOverflow
Comment

PREVIOUS NEXT
Code Example
Csharp :: comments in c# 
Csharp :: unity toint 
Csharp :: c# handle dbnull value 
Csharp :: get selected item datagrid wpf 
Csharp :: stringbuilder to string c# 
Csharp :: unity banner Ad position 
Csharp :: list min and Max value in c# 
Csharp :: create new .net core project visual studio 
Csharp :: csharp get decimal part of number 
Csharp :: mvc session key exists 
Csharp :: c# string console readline array 
Csharp :: c# add 2 arrays 
Csharp :: what value of combobox index c# 
Csharp :: web page search c# 
Csharp :: Map Range Clamped unity 
Csharp :: entity framework delete record with foreign key constraint 
Csharp :: unity model ripper 
Csharp :: c# substring until character single 
Csharp :: rigidbody.addforce not working 
Csharp :: get connection string from web.config in c# 
Csharp :: linq string comparison case insensitive 
Csharp :: c# linq list select 
Csharp :: string in c# 
Csharp :: c# unit test for throwing exception method 
Csharp :: C# get column of 2d array 
Csharp :: unity audio source 
Csharp :: How to use the protected keyword in C# 
Csharp :: c# get random between 0 and 1 
Csharp :: c# caractère cacher mot de passe 
Csharp :: c# merge two lists as queryable 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =