You Tube

Sunday 19 March 2017

make variable available to all windows form c#

Go to Project -> Add Class.  Name your class Variables.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.SqlClient;
using System.Data;
using System.Configuration;
using System.Text.RegularExpressions;
using System.IO;
using System.Net;

namespace MY_namespace
{
    class my_global_Variables
    {
        public static string var1 = "Something";
    }
}

No comments:

Post a Comment