IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-10-24 20:19:38
Channels: 41
Logged Lines: 6230436
Size: 1822.19 MB
Powered by
Channel Info
Network: freenodeChannel: #csharp |
Search in www.irclog.org
Log from #csharp at freenode 2006-06-17
[03:51]<sz2yzgrzzsx>Fr3DBr, correct, the dispose method internally calls this.Close for that object
[03:51]<sz2yzgrzzsx>the reader does not implement IDisposible
[03:51]<sz2yzgrzzsx>you have to call close
[03:51]<eg->vulture yeah I'm in a foreach(type foo in TypeArray){ and I'm trying to use it on 'foo' but having issues
[03:51]<sz2yzgrzzsx>i thought that was stupid
[03:51]<sz2yzgrzzsx>unless they changed it in 2.0
[03:52]<vufvuzn>zn-: trying to use what? having what kind of issues?
[03:53]<sz2yzgrzzsx>oh, in 2.0 it does implement IDisposible
[03:53]<sz2yzgrzzsx>so my answer changes depending on the framework
[03:53]<sz2yzgrzzsx>you should always call dispose when possible
[03:55]<eg-> MethodInfo invoke = deleg.GetMethod(type.ToString()); invoke is null for some reason even with the deleg.GetMethod() storing a value for starters ;p
[03:55]<fz1dbz>so sabiancrash
[03:56]<fz1dbz>that could be the main problem i had
[03:56]<fz1dbz>with my app freezing when using sql
[03:56]<fz1dbz>hehe
[03:57]<fz1dbz>http://pastehere.com/?lvrfhu
[03:57]<fz1dbz>thats what it looks like now
[04:01]<vufvuzn>zn-: was there a question there?
[04:02]<eg->yeah I'm trying to figure it out unsuccessfully if you have any input it would be appreciated
[04:02]<vufvuzn>sure.. what do the docs for GetMethod say about its return?
[04:02]<vufvuzn>seems pretty clear..
[04:03]<vufvuzn>A MethodInfo object representing the public method with the specified name, if found; otherwise, a null reference
[04:03]<vufvuzn>so.. if you got null, it's because htere was no such method with the name you specified
[04:03]<vufvuzn>why do you expect that "type.ToString()" should return the name of a method that exists in "deleg"?
[04:04]<eg->I changed that to type.FullName and still no luck
[04:04]<eg->well type has a value when I hover my house over it
[04:04]<eg->and over the name however invoke isn't getting set
[04:05]<vufvuzn>'type has a value' - what's that got to do with anything?
[04:05]<vufvuzn>so why do you expect 'type.FullName' is the name of a method in 'deleg'?
[04:05]<eg->I'm doing System.Type[] ExistingTypes = LoadedAssembly.GetTypes();foreach (Type type in ExistingTypes)
[04:05]<vufvuzn>So?
[04:06]<vufvuzn>Why would the full name of a type be the name of a method?
[04:06]<eg->Type deleg = type; MethodInfo invoke = deleg.GetMethod(type.FullName);
[04:06]<vufvuzn>you really seem to be missing a rather fundamental part of your brain.
[04:06]<vufvuzn>deleg is a _type_
[04:06]<vufvuzn>GetMethod needs a string, that names a method in that type.
[04:06]<eg->How about this
[04:06]<vufvuzn>class Foo { public void Bar() { } };
[04:06]<vufvuzn>Foo is the name of a type Bar is the name of a method in the Foo type.
[04:07]<vufvuzn>If you ask Foo if it has a method called Foo, it's clearly going to say it doesn't.. because it doesn't.
[04:07]<eg->did I mention I'm learning? :)
[04:07]<vufvuzn>it has a method called Foo
[04:07]<vufvuzn>you might want to skip using erflection until you understand the concepts it exposes
[04:07]<vufvuzn>learn to implement classes, write methods, etc
[04:07]<eg->I am learning reflection with this or trying
[04:07]<vufvuzn>that way you'll know what hte documentation is refering ot when it says "method" or "class"
[04:07]<eg->forget it
[04:08]<eg->you're a fucking prick
[04:08]<vufvuzn>Stop learning reflection. Learn it _after_ you've learnt basic language concepts htat are necessary to understand reflection.
[04:08]<eg->I appreciate the comments
[04:08]<eg->not your cander
[04:08]<eg->single I take it?
[04:08]<eg->there, my response was just as helpful as yours
[04:08]<vufvuzn>how was my response unhelpful?
[04:09]<vufvuzn>I explained what a method and a class was, why the name of one is not the same as the name of another
[04:09]<eg->your attitude isn't helpful
[04:09]<vufvuzn>and I even explained a more general problem with your approach, and a solution to that as well
[04:10]<vufvuzn>how can you expect to understand the concepts that reflection deals with, without having dealt with the representation it reflects on?
[04:11]<ygjgj>reflection is an easy concept made hard by C# :)
[04:11]<vufvuzn>inono: Doesn't seem overly hard, much the same as Java's reflection API.
[04:11]<ygjgj>python makes it a lot easier imo
[04:12]<vufvuzn>sure, language-level support for first-level functions, objects, types, etc makes things a bit different
[04:12]<ygjgj>i dont see why you have to jump through so many syntactic hoops in c#
[04:12]<vufvuzn>how so?
[04:12]<ygjgj>i heard it'll be better in 3.0
[04:12]<vufvuzn>reflection is basically a library level thing - there's no fancy syntax..
[04:12]<ygjgj>one of the downsides
[04:12]<vufvuzn>guess they'll probably add fancy syntax then.. *shrugs*
[04:12]<vufvuzn>I don't really see a need
[04:13]<ygjgj>reflection should be more closer to the language
[04:13]<ygjgj>i dont know maybe im just spoiled by python
[04:15]<sz2yzgrzzsx>Fr3DBr, it works now?
[04:15]<fz1dbz>sabiancrash i think so... right now i have another problem to solve here
[04:16]<ygjgj>i guess its nicer having metadata straight in your object instead of using an extra library
[04:16]<fz1dbz>sabiancrash ill solve it and benchmark to see if its better :]
[04:22]<fz1dbz>lets get i get attacked by alot of incoming connections and disconnections
[04:22]<fz1dbz>lets see if i get*
[04:22]<fz1dbz>what could i do to prevent from my server stopping accepting newer connections from some time?
[04:23]<fz1dbz>because it seens too much ports get into time_wait state and then i cant accept newer connections until those connections are really closed
[04:27]<fz1dbz>sabiancrash may i pm you?
[04:27]<fz1dbz>http://pastehere.com/?vcwxee <- do you guys think this would work in a Asynchronous Server ?
[04:34]<fz1dbz>also the bigger servers should have a solution to handle a issue like that
[04:34]<fz1dbz>that isnt too uncommon hehe
[05:13]<sz2yzgrzzsx>Fr3DBr, i am heading out
[05:13]<sz2yzgrzzsx>and i cannot reach pastehere atm
[05:14]<sz2yzgrzzsx>some advice
[05:14]<sz2yzgrzzsx>look to see what ports are in time_wait
[05:14]<sz2yzgrzzsx>as in source and destination
[05:15]<sz2yzgrzzsx>to give you a clue what application it might be
[05:15]<sz2yzgrzzsx>use tcpview if your not using it
[05:15]<sz2yzgrzzsx>make sure its your application
[05:15]<sz2yzgrzzsx>ok
[05:15]<sz2yzgrzzsx>later
[05:16]<fz1dbz>i already make sure its my app
[05:17]<fz1dbz>made*
[05:19]<kjr>zn-: in regards to your outburst earlier.... I've known vulture for a few years now in a few channels... you shouldn't be defensive when he tells you such things. By and large he knows exactly what he's doing, and he means to tell you in a pedagogical context, not condescention
[06:11]<gnwlnzs>in my .NET application, i have some settings, which need to be editabl by the application's administrator. should i store these settings in a table (DB) or should i store this on the filesytem in xml or some similar format
[06:31]<brrvr>giddigy giddigy giddigy giddigy lets have sex







