1 Replies - 6325 Views - Last Post: 07 February 2009 - 12:19 AM Rate Topic: -----

#1 jenphoenix   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 25-November 08

convert c to vb.net

Posted 06 February 2009 - 07:32 PM

#include "global.h"

struct entry keywords[] = {
	"div", DIV,
	"mod", MOD,
	0, 0

	struct entry *p;
	for(p = keywords;p -> token; p++)
	 insert(p -> lexptr, p->token);

how to convert structs from c program to vb.net program??
also the header files.
i want to put it in a module in vb.net but i dont know how to convert some of the code..

Is This A Good Question/Topic? 0
  • +

Replies To: convert c to vb.net

#2 Martyr2   User is offline

  • Programming Theoretician
  • member icon

Reputation: 5227
  • View blog
  • Posts: 14,010
  • Joined: 18-April 07

Re: convert c to vb.net

Posted 07 February 2009 - 12:19 AM

VB.NET has structures too, very similar. Below is an example of a structure...

Structure entry
	Public div As String
	Public mod As String
End Structure

Do a google search for VB.NET structures and you can find all sorts of material on how to use them.

VB.NET has no need for headers, instead the .NET framework uses namespaces. You will see them at the top of your programming like System.IO would handle files etc. Again, check out "namespaces" on the net.

Lastly, VB.NET also has modules which you can simply add to your project. Code in modules are designed to be seen throughout the project, just like they did back in VB 6. Modules can contain classes, structures, enums, functions etc.

Looks like you might just need to pick up a VB.NET book and do a little reading on the related chapters to modules, namespaces, and structures.

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1