d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Looking For C# Helper
12Next
Add Reply New Topic New Poll
Member
Posts: 11,610
Joined: Oct 28 2008
Gold: 1,795.00
Mar 6 2013 04:39pm
Looking for people who are experienced with c# so I can pm them with my questions, decided I'll learn c# next.
Member
Posts: 13,425
Joined: Sep 29 2007
Gold: 0.00
Warn: 20%
Mar 6 2013 05:55pm
should just create a on going thread and dump questions.

i dont know .net that well but C# is pretty close to C so yea.
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Mar 6 2013 06:05pm
i learned 2.0 back in high school. it's before lambdas, linq, etc. i've looked over the new features but havent really used em. just post your questions.
Member
Posts: 2,478
Joined: Jan 4 2007
Gold: 7,545.00
Mar 7 2013 07:53am
i'm currently working with C#.Net, I can do my best to help but no promises.
Member
Posts: 20,413
Joined: Dec 16 2006
Gold: 27,171.00
Member
Posts: 11,610
Joined: Oct 28 2008
Gold: 1,795.00
Mar 13 2013 10:56am
Quote (Koryu @ Mar 13 2013 08:16am)


I had never used Google b4 ty for this irrelevant post.
Member
Posts: 11,610
Joined: Oct 28 2008
Gold: 1,795.00
Mar 15 2013 02:10pm
Can anyone tell me when I wouldn't use a static function for moving renaming deleting or creating a file?
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Mar 15 2013 10:38pm
Are you referring to using methods you create? Or are you comparing System.io.File vs System.io.FileInfo?

If the former, are you talking about when to use static vs non static in general? Or what?

If the latter, then the static methods in File all perform security checks, whereas FileInfo only does the check once iirc. So if you're doing a lot of stuff with the same file, use an object. if it's just once, use the static method. java's open source which makes it easy to see what the library functions do, but in .NET you can use a reflector to see it too. i highly recommend doing it or googling + documentation
Member
Posts: 11,610
Joined: Oct 28 2008
Gold: 1,795.00
Mar 16 2013 12:00am
Quote (carteblanche @ Mar 15 2013 11:38pm)
Are you referring to using methods you create? Or are you comparing System.io.File vs System.io.FileInfo?

If the former, are you talking about when to use static vs non static in general? Or what?

If the latter, then the static methods in File all perform security checks, whereas FileInfo only does the check once iirc. So if you're doing a lot of stuff with the same file, use an object. if it's just once, use the static method. java's open source which makes it easy to see what the library functions do, but in .NET you can use a reflector to see it too. i highly recommend doing it or googling + documentation


Yes I was asking about file and fileinfo, but I must not be thinking right, I am wanting a situation where I would want to use file info
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Mar 16 2013 12:12am
Quote (0n35 @ Mar 16 2013 02:00am)
Yes I was asking about file and fileinfo, but I must not be thinking right, I am wanting a situation where I would want to use file info


suppose i want to find out the file size, when it was last modified, if it's read-only, and whether it's hidden. if it's super old, i wanna delete it. if it's mildly old, i wanna rename it. etc.

like i said, if you wanna do multiple things, use the file info.

personally i've always used file info. things like crawling the directory makes more sense to me. go through a directory, based on the metadata add them to archive, delete, then recurse.

This post was edited by carteblanche on Mar 16 2013 12:19am
Go Back To Programming & Development Topic List
12Next
Add Reply New Topic New Poll