Link to home
Start Free TrialLog in
Avatar of AxDSan
AxDSan

asked on

Convert C# to VB.NET

Hello I'm trying to make a plugin for a personal project I'm working on VB.NET however it's being difficult for me as I'm not an adept in C#.

The code I'm trying to convert is this:

using System;
using System.Collections.Generic;
using System.Windows.Form;
using Plugin.Classes;
using Plugin.Interfaces;

namespace MyFirstPlugin
{
	[Serializable]
	public class MyFirstPlugin : IPluginInstruction
	{
		private List<IPluginArgument> _arguments;

		public MyFirstPlugin()
		{
			_arguments = new List<IPluginArgument>();
			_arguments.Add(new PluginArgument(ArgumentType.Text, 250, "Text", "The text to display", null));
		}
		public void Execute()
		{
			MessageBox.Show(_arguments[0].value.ToString());
		}
		public string Name
		{
			get 	{ 	return "My First Plugin";	}
		}
		public ILists<IPluginArgument> Arguments
		{
			get 	{ 	return _arguments;	}
		}

		public event EventHandler<SetVariableEventArg> SetVariable;
	}
}

Open in new window


I've tried using the automated converters out there, but they seem to fix only a portion of the problem, when I type down the converted code back in Visual Studio, it prompts other errors like:

User generated image
Avatar of p_davis
p_davis

for implement issues just highlight your interface and there should be a tab on the bottom left of the name. if you select that there should be some implement options.
Avatar of AxDSan

ASKER

This is what happens when I highlight the interface:

User generated image
right click on it, then... there is a listing for implement interface
Avatar of AxDSan

ASKER

Right Clcked:
User generated image
ASKER CERTIFIED SOLUTION
Avatar of p_davis
p_davis

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AxDSan

ASKER

Thank you very much, solved.
sweet.... you are welcome.