Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Very Simple I/O *.INI Reader

(Jan 11, 2014 04:21 PM)Tedd Wrote:  It's a loop because it shows the speed if you were using the function hundreds of times, do you understand logic?

Why would you use the framework's function, if it's slower than the function you use?? Riddle me that.

Why would you be running it that many times for it to make enough of a difference? You need to combine a path once in 99% of the situations it's going to be applied in.

I use the same practices you do, but he makes a good point. Also, one more thing: You don't exactly need to use Console.Out.Writeline(), since it's the same as Console.WriteLine(). This is what the latter looks like:

Code
Public Shared Sub WriteLine(value As String)
    Out.WriteLine(value)
End Sub

Out.WriteLine should be used when you need to apply a TextWriter (i.e. piping other application's output).
(Jan 11, 2014 04:21 PM)Tedd Wrote:  It's a loop because it shows the speed if you were using the function hundreds of times, do you understand logic?

Why would you use the framework's function, if it's slower than the function you use?? Riddle me that.

I believe there are some platform issues when you use the string concatenation instead of the Path.Combine method. I can recall having some issues with combining paths on Japanese systems (or maybe another language) which used for example other directory separators. Therefore, you are always save if you use the Combine method.
https://github.com/Washi1337

"I'll tell you this UDP joke, and I don't care if you will get it or not."
(Jan 12, 2014 01:51 PM)Washi Wrote:  I believe there are some platform issues when you use the string concatenation instead of the Path.Combine method. I can recall having some issues with combining paths on Japanese systems (or maybe another language) which used for example other directory separators. Therefore, you are always save if you use the Combine method.

See, THAT is good reasoning. With ident saying that "you should just because you should" because "I am a programmer and you are not," he is not explaining why something should be done a certain way, he is just being a dick.
Thanks for the source. Seems very handy!
[Image: VgXWA2P.png]
I know a lot of people look for this code & it's one of the things I'm asked about a lot.... I'm gonna send them to your code :) Great share :)
(Jan 12, 2014 01:51 PM)Washi Wrote:  I believe there are some platform issues when you use the string concatenation instead of the Path.Combine method. I can recall having some issues with combining paths on Japanese systems (or maybe another language) which used for example other directory separators. Therefore, you are always save if you use the Combine method.

(Jan 12, 2014 10:57 PM)ᒪeumonic Wrote:  See, THAT is good reasoning. With ident saying that "you should just because you should" because "I am a programmer and you are not," he is not explaining why something should be done a certain way, he is just being a dick.

Exactly. TUP, I get your point and that really makes sense. I respect that, and it makes sense when you explain it that way. I'm just sick of ident coming in to threads and saying "you suck you're a horrible programmer why would you use Ijk() instead of Abc.Edf() you cunt!?".. This is why people respect you, and not him.

(Jan 13, 2014 12:38 AM)Oscura Wrote:  Thanks for the source. Seems very handy!

Thank you!

(Jan 13, 2014 07:29 AM)nuk Wrote:  I know a lot of people look for this code & it's one of the things I'm asked about a lot.... I'm gonna send them to your code :) Great share :)

Thanks man! That's why I like sharing :)
[Image: 86251a37e635a21aea7eb7e014b0d820.gif]
C# conversion for you...
Figured it'd help. :P
http://pastebin.com/WzW3zT3J
(Jan 13, 2014 06:35 PM)ᒪeumonic Wrote:  C# conversion for you...
Figured it'd help. :P
http://pastebin.com/WzW3zT3J

Thank you, added to the original post!!
[Image: 86251a37e635a21aea7eb7e014b0d820.gif]


Possibly Related Threads...
Thread / Author Replies Views Last Post
by TheArchitectDec 31, 2022 02:38 AM 12 302 Dec 31, 2022 02:38 AM
Last Post: TheArchitect
[C#] by SIM-4785719Jul 27, 2020 06:40 PM 6 214 Jul 27, 2020 06:40 PM
Last Post: gigajew
[.NET] by BarretJan 30, 2018 08:25 AM 21 890 Jan 30, 2018 08:25 AM
Last Post: Ninja