Hi,
Here is my code in VB.NET
it works perfectly, it opens test.edp and reads some values from the screen.
Now I want to convert it ot C#
this will produce the following error:
'object' does not contain a definition for 'GetString' and no extension method 'GetString' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?)
is it possible to implement it in C#?
please advice.
Here is my code in VB.NET
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim mySystem As New EXTRA.ExtraSystem
Dim mySessions As EXTRA.ExtraSessions = mySystem.Sessions
Dim mySession As EXTRA.ExtraSession = mySessions.Open("C:\test.edp")
MessageBox.Show(mySession.Screen.GetString(4, 27, 31))
End Sub
it works perfectly, it opens test.edp and reads some values from the screen.
Now I want to convert it ot C#
Code:
private void button1_Click(object sender, EventArgs e)
{
EXTRA.ExtraSystem mySystem =(EXTRA.ExtraSystem) new EXTRA.ExtraSystem();
EXTRA.ExtraSessions mySessions = (EXTRA.ExtraSessions)mySystem.Sessions;
EXTRA.ExtraSession mySession = (EXTRA.ExtraSession)mySessions.Open("C:\\test.edp");
MessageBox.Show(mySession.Screen.GetString(4, 27, 31));
}
this will produce the following error:
'object' does not contain a definition for 'GetString' and no extension method 'GetString' accepting a first argument of type 'object' could be found (are you missing a using directive or an assembly reference?)
is it possible to implement it in C#?
please advice.