This website is run by the community, for the community... and it needs advertisements in order to keep running. Blocking our ads means your killing our stats!
Please disable your ad-block, or become a premium member to hide all advertisements and this notice.

This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

request.mappath

This website is run by the community, for the community... and it needs advertisements in order to keep running. Blocking our ads means your killing our stats!
Please disable your ad-block, or become a premium member to hide all advertisements and this notice.

This website is run by the community, for the community... and it needs advertisements in order to keep running. Blocking our ads means your killing our stats!
Please disable your ad-block, or become a premium member to hide all advertisements and this notice.

Does it really matter? There are various reasons why it could be. For a start, one of them could be deprecated in favour of the other (much like msgbox versus messagebox in vb.net), or it could be that at one time they referred to something slightly different, but have now converged to have the same definition.

The important thing is that the result is the same, so which you use is down to personal preference.

Edit: In fact, its exactly like the difference between:
System.IO.File.Exists("C:\test.txt")

and

My.Computer.FileSystem.FileExists("C:\test.txt")

There isnt any difference, its just a different way of getting the same information. Its just a shortcut to get the same information. Rather than include two separate chunks of code in the framework, they have simply set one or the methods to point to the other, meaning that if they need to modify the method, they just do it in one place.

You have created a single sub that returns the current time, but you have two buttons that need to perform the same action. I could have put the code into each of the click events individually, but instead I chose to write a third sub, and have the click events call that third sub. If I ever need to expand the functionality of the sub, I Only have to change it in one place.

CertForums.com is not sponsored by, endorsed by or affiliated with Cisco Systems, Inc. Cisco®, Cisco Systems®, CCDA™, CCNA™, CCDP™, CCNP™, CCIE™, CCSI™; the Cisco Systems logo and the CCIE logo are trademarks or registered trademarks of Cisco Systems, Inc. All other trademarks, including those of Microsoft, CompTIA, VMware, Juniper ISC(2), and CWNP are trademarks of their respective owners.