Wednesday, February 6, 2013

Bizarre c# features : global


namespace hody
{
    public partial class Form1 : Form
    {


private void button6_Click(object sender, EventArgs e)
        {
            feh.showfeh();
            global::feh.showfeh(); 
        }

public static class feh
    {
        public static  void showfeh()
        {
            MessageBox.Show("feh");
        }
    }




//a different file

using System.Windows.Forms;


   public static class feh
    {
        public static void showfeh()
        {
            MessageBox.Show("global feh");
        }
    }


No comments:

Post a Comment