I have sample windows app written in C#.net and I have a global variable which i need to share to different applications when my app is running.
Below is code :
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Test
{
public partial class Form1 : Form
{
public string GlobalValue = string.Empty;
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
if((textBox1.Text!="") && (textBox1.Text!=null))
{
GlobalValue = textBox1.Text.ToString();
}
}
}
}
In above code, user enters a value in text box and GlobalValue is updated on button click event.
I want to share the value of variable GlobalValue across different applications and how do i do it in C#. Suppose I'm running 3D Mark along with my sample app and this GlobalValue should be accessible to 3D Mark app or any other app.
I don't won't to use the registry to store the value.. need some other way
If an example is given, it will be really helpful for me.
thanks,