5 Replies - 438 Views - Last Post: 19 June 2012 - 07:29 AM Rate Topic: -----

#1 ramsalgefel  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 08-June 12

How to convert this code from c# to vb.net

Posted 19 June 2012 - 06:04 AM

 Properties.Settings.Default.filebeforeedit = file;
                   Properties.Settings.Default.Save();


i cannot find on net so i decided to get help from you guys,
please help me with that


thanks in advance

regards
rams
Is This A Good Question/Topic? 0
  • +

Replies To: How to convert this code from c# to vb.net

#2 Ryano121  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1362
  • Posts: 3,002
  • Joined: 30-January 11

Re: How to convert this code from c# to vb.net

Posted 19 June 2012 - 06:07 AM

Using Settings in C#
Was This Post Helpful? 0
  • +
  • -

#3 ramsalgefel  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 08-June 12

Re: How to convert this code from c# to vb.net

Posted 19 June 2012 - 06:53 AM

i already read those things, but i dont what is this properties.blabla
means in vb.net

:(

thanks for the links sir
Was This Post Helpful? 0
  • +
  • -

#4 Ryano121  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1362
  • Posts: 3,002
  • Joined: 30-January 11

Re: How to convert this code from c# to vb.net

Posted 19 June 2012 - 07:02 AM

Essentially the filebeforedit setting is being set to the value of the file variable, then the settings are saved.

In VB.Net it will be more like

My.Settings.filebeforeedit = file
My.Settings.Save()


Vb tutorial

This post has been edited by Ryano121: 19 June 2012 - 07:03 AM

Was This Post Helpful? 0
  • +
  • -

#5 Kilorn  Icon User is offline

  • XNArchitect
  • member icon



Reputation: 1356
  • View blog
  • Posts: 3,528
  • Joined: 03-May 10

Re: How to convert this code from c# to vb.net

Posted 19 June 2012 - 07:08 AM

It might not help in this specific instance, but here is a great link that will convert code from C# or VB.NET to C#, VB.NET, Python, or even Ruby. All you have to do is choose which language to convert from, which language to convert to, paste your code into the box, and hit the Convert button.
Was This Post Helpful? 0
  • +
  • -

#6 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 574
  • View blog
  • Posts: 2,989
  • Joined: 19-May 09

Re: How to convert this code from c# to vb.net

Posted 19 June 2012 - 07:29 AM

The important thing to understand here is that C# and VB.Net both use the same set of .Net objects. So "properties.blabla" means in VB.Net "properties.blabla", to use your colorful example. :)

All you have to do in this case, as ryano points out, is remove the semicolons from the end of the line, because all you're doing is accessing .Net object properties and methods.

Most of the time, the differences between C# and VB.Net are simply syntax. They both compile to the same IL ("intermediate language") code.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1