Saturday, May 5, 2012

Create text using StreamWriter


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Security.Permissions;
using System.Security;
using System.IO;


namespace Examples
{
    public partial class security : Form
    {
        public security()
        {
            InitializeComponent();
        }
     
        private void security_Load(object sender, EventArgs e)
        {

        }
        StreamWriter sw;
        private void button1_Click(object sender, EventArgs e)
        {
            sw = File.CreateText(@"E:\\demo.txt");
            sw.WriteLine("Hello");
            sw.Close();
        }
    }
}

No comments:

Using Authorization with Swagger in ASP.NET Core

 Create Solution like below LoginModel.cs using System.ComponentModel.DataAnnotations; namespace UsingAuthorizationWithSwagger.Models {     ...