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: 1825.68 MB
Powered by
Channel Info
Network: freenodeChannel: #csharp |
Search in www.irclog.org
Log from #csharp at freenode 2006-07-30
[04:16]<sdnffdxdlld>*gone*
[05:16]<sxrmmr>Hey guys,
[05:16]<sxrmmr>what would your suggestion be if I need to "push" a bit of data to another box? Not looking to write a web service (yet), I need something quick and dirty
[05:23]<saxgjjmfns>what is java's equivalent of IOException in C#
[05:24]<al->Shadda: a socket
[05:26]<vufvuzn>schnoodles: RTFM, it's kind of obvious..
[05:30]<sxrmmr>Okay, another question...I'm not really sure how the hell to use the dialogue controls
[05:31]<sxrmmr>Anyone have any links on that? like, FolderBrowserDialogue
[05:31]<sxrmmr>Can't find anything on google or msdn that shows usage
[06:21]<vyzusdjvnev>why is this an error?
[06:21]<vyzusdjvnev>Message 43 Could not find schema information for the element 'http://schemas.microsoft.com/.NetConfiguration/v2.0:error'. C:\BalloonShop\Web.Config 49 5 C:\BalloonShop\
[06:37]<znzj>Hm. I'm trying to get the type for the 'string' primitive/object type, to pass in as a parameter type using reflection. Type.GetType("string") doesn't seem to return a type, any ideas how I can get string ?
[06:37]<znzj>or do I need to specify a fully qualified name, eg, System.string ?
[06:42]<ffrv>"string" is just an alias for System.String that the C# compilter implements
[06:43]<ffrv>getting the type is easiest by using typeof(string)
[06:43]<znzj>I think I've found the problem. Reflection can only see public members.
[06:43]<ffrv>by using typeof, you leverage the compiler's alias and don't need to know what it actually aliases to
[06:43]<znzj>unlike in Java (what I'm used to), which can see private members also.
[06:43]<ffrv>reflection can see private members too, you just have to include them via the flags
[06:44]<ffrv>NonPublic iirc
[06:44]<znzj>as BindingFlags?
[06:44]<ffrv>sounds right
[06:45]<znzj>gah... there's only a real complex getMethod that has bindingFlags, just my luck heh.
[06:45]<znzj>I don't *reallly* want to have to specify all those other actual params... oh well. Will just have to wrap it myself.
[06:45]<ffrv>you can pass in null for lots of them
[06:46]<znzj>including Type[] ? The documentation on it is pretty vague :/
[06:46]<znzj>i'll give it a try anyway, see what happens.
[06:46]<ffrv>those are the types of the params - pretty important info to pass when trying to figure out which method to give you :)
[06:47]<znzj>so if there's only one method with a particular name, it won't return that method? danm.
[06:47]<ffrv>there's an overload that takes just string and bindingflags - why not use that?
[06:47]<saxgjjmfns>anyone know how to show the TraceRoute in an Exception ?
[06:48]<ffrv>http://msdn2.microsoft.com/en-us/library/05eey4y9.aspx
[06:48]<saxgjjmfns>like how in Java its e.printTraceRoute()
[06:48]<ffrv>schnoodles: traceroute? I'm guessing you mean stack trace - and you can create a stack trace at any time (new StackTrace())
[06:49]<znzj>well, specifying myType.GetMethod("methodName", BindingFlags.NonPublic); isn't returning my method, so I'm guessing I'm going to need the whole lot, including the parameter types (the method has a String param)
[06:49]<saxgjjmfns>oh sorry and yeah i meant that :\
[06:50]<ffrv>Zero: what's the signature for the method?
[06:50]<saxgjjmfns>Flav, would i create it with in the Exception Catch ?
[06:50]<znzj> public void parseMove(string command)
[06:50]<znzj>which I'm trying to access with MethodInfo mi = typ.GetMethod("parseMove", BindingFlags.NonPublic, null, new Type[] { stringType }, null);
[06:51]<ffrv>Zero: if it's public, why are you passing NonPublic?
[06:51]<znzj>typ and stringType are the relevant classes as necessary. I've been able to get it if I change it to public and... oops. heh. sec, will fix that.
[06:51]<znzj>tried it just now as private, still doens't find it.
[06:52]<ffrv>Zero: pastebin the source?
[06:54]<ffrv>schnoodles: ah - in a catch you'll more likely just access the StackTrace property off the exception
[06:54]<ffrv>schnoodles: http://msdn2.microsoft.com/en-us/library/system.exception.stacktrace.aspx
[06:56]<ffrv>Zero: it's an instance method, make sure to include that in the bindingflags (IIRC)
[06:56]<znzj>I've just pasted the relevant info,, but you can cut/paste it as necessary. http://rafb.net/paste/results/79131S87.html
[06:57]<ffrv>Zero: are you going to construct an instance of the type via reflection as well?
[06:57]<znzj>nope, I'm using the same instance for this one.
[06:57]<znzj>I basically have a command table, which I want to use to invoke methods based on input string data.
[07:01]<znzj>hm, interesing, when I do type.GetMethods(BindingFlags.NonPublic), I get nothing back at all.
[07:02]<znzj>well, I lie, I get an empty array of MethodInfo
[07:02]<ffrv>you're not including Instance
[07:02]<znzj>that's a litlte confusing, why would it need Instances?
[07:03]<znzj>but yes, it found the method by adding the flag. odd.
[07:03]<ffrv>because it's an instance method, not a static method
[07:03]<znzj>mm, I see, so it would only be returning static members normally.
[07:03]<znzj>yeah. Hm. oh well. glad that's sorted.
[07:04]<znzj>excellent, now I can just use String, BindingFlags. Thanks for that.
[07:04]<ffrv>np
[08:12]<xylxjzys>AnarkiNet, you around?
[08:14]<nnzjpfrr>uhm.
[08:14]<nnzjpfrr>you've been hanging arround here for more than 8 hours? oO
[08:16]<xylxjzys>are you talking to me?
[08:17]<xylxjzys>i haven't talked on this network since i was here 8 hours ago
[08:17]<xylxjzys>if you mean have I logged off my IRC client ... well really, I don't understand your question
[08:17]<nnzjpfrr>yeah. :P
[08:17]<xylxjzys>if you're asking whether my nickname has been signed on, then it's been signed on since this morning
[08:17]<xylxjzys>I don't really have a reason to log it off IRC ... soo ....
[08:18]<nnzjpfrr>you were talking when I went to bed.
[08:18]<nnzjpfrr>and you are talking now.
[08:19]<nnzjpfrr>so either you don't sleep as much as I do or you spend too much time on IRC. :P
[08:24]<2frgcd>wow I just tested, and this thing ( http://developer.sharpdevelop.net/codeconvert.net/Convert.aspx ) really does work
[08:24]<2frgcd>and I didn't input some simple little snippet
[08:28]<xylxjzys>zeroflag: well, maybe you shouldn't go to bed at noon and wake up at 8 PM :)
[08:28]<xylxjzys>or live in some crazy place in the world :p
[08:52]<zgzzcygnv>Xiphoris im here
[08:52]<zgzzcygnv>sorry just got off the phone
[08:52]<sz2yzgrzz>bannana phone
[08:52]<zgzzcygnv>lol
[08:53]<zgzzcygnv>rofl: http://www.metacafe.com/watch/7131/super_cop/
[08:55]<sz2yzgrzz>i need to rofl to bed
[10:06]<znzj>hm. What's the C# equivelant of having, say, static final/static const ... ?
[10:13]<mracn>you want a static constant variable?
[10:14]<mracn>in that case, static const will work just fine
[10:14]<mracn>or static readonly
[10:14]<cjmgrug>hey Macke :)
[10:14]<mracn>hey cr
[10:31]<zgzzcygnv>-_-
[10:49]<cjmgrug>hey AnarkiNet
[10:49]<mracn>hey, my intellisense is all fucked up
[10:50]<cjmgrug>were you the one who suggested, the other day, that someone should build a 'process saver/restorer' ?
[10:50]<mracn>it says something like: "RepaintNodes" in the box, but if I press enter I get "Remove" instead
[10:50]<mracn>no
[10:50]<cjmgrug>i was talking to AnarkiNet
[10:50]<cjmgrug>:p
[10:50]<zgzzcygnv>yes







