C# Code
namespace Hello
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
PubNames.Responce = "Did This Work";
MessageBox.Show(PubNames.Responce);
}
public void AddLog(string Texttoadd)
{
SayLog.Text = SayLog.Text + Texttoadd + Environment.NewLine;
}
}
public class PubNames
{
public static string Responce = "Why";
public static string SayHello(string WhatToSay)
{
MessageBox.Show(WhatToSay);
return Responce;
}
}
}
VB Code
(Included in References is Hello.exe, shows up as type ".NET"
Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click MsgBox(Hello.PubNames.Responce) End Sub End Class
Now when I start the C# Program, the MsgBox shows "Did This Work" as I would expect.
But when the VB Program runs it only shows "WHY" even though the C# Program is running (And should of already set Responce to "Did This Work"
What am I doing wrong :confused::confused::confused:


Sign In
Create Account


Back to top









