Link to home
Start Free TrialLog in
Avatar of Victor  Charles
Victor CharlesFlag for United States of America

asked on

Help with renaming in xml file using vb.net

Hi,

How do you rename an xml file in the applications's folder using vb.net?

Thanks,
Victor
SOLUTION
Avatar of Jacques Bourgeois (James Burger)
Jacques Bourgeois (James Burger)
Flag of Canada image

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 Wayne Taylor (webtubbs)
You can also use File.Move.
ASKER CERTIFIED SOLUTION
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
Personally, I never recommend My.Computer. This is only a shortcut provided for amateur VB programmers, to facilitate the move from VB classic to VB.NET.

Although it is an easy way out for the most common commands, it is a lot more limited than directly using the framework classes. For instance, the framework offers 5 classes to deal with files, directories and drives. My.Computer.FileSystem combines features from these 5 classes, but has less methods than each of the System.IO classes individually. The System.IO classes are thus a lot more powerful.

Also, My does not exist in other languages, it is a VB only feature. Taking the habit of using the "real" .NET classes instead of the wrapper that My will make it easier to eventually move to another language, because System.IO is available in every .NET language, while My exists only in VB.
Avatar of Victor  Charles

ASKER

Hi,
Thank you forr all the comments.
Victor
Please close the question.

Thanks
Thank You.