IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-04-02 18:00:08
Channels: 41
Logged Lines: 6229042
Size: 1807.33 MB
Powered by
Channel Info
Network: freenodeChannel: #csharp |
Search in www.irclog.org
Log from #csharp at freenode 2006-07-17
[00:00]<zzcn>is there some existing invalid arguments exception?
[00:01]<zzcn>Also, if a passed stream doesnt support read/write, what exception would I logically use to signify that?
[00:03]<zzcn>ah nevermind
[00:03]<zzcn>search and thou shalt find, arke
[00:10]<-- 2yd2nzy xrs fuyv>http://iownmymusic.org/ http://iownmydvds.org/ .")
[00:23]<2frgcd>hey guys
[00:23]<2frgcd>in C# how do I do the equivalent of a system("command") in C/C++
[00:24]<2frgcd>Basically I want to execute a batch file
[00:24]<y-gz>blanky: http://monoport.com/564
[00:25]<2frgcd>thanks i-nZ
[00:37]<cj2nz>Hey, do you guys know of any way to pass like object.GetType() to default() or using a generic method like List<obj.GetType()> list
[00:38]<sdnffdxdlld>kober GetType returns a Type
[00:38]<sdnffdxdlld>so you'd pass it via a param
[00:38]<sdnffdxdlld>Method(Type type)
[00:38]<sdnffdxdlld>this.Method(object.GetType());
[00:39]<cj2nz>smellyhippy, Yes but i'm trying to pass it into a generic method
[00:39]<cj2nz>So the method takes method<T>()
[00:39]<cj2nz>so I want to do method<obj.GetType>();
[00:39]<sdnffdxdlld>I think you;d have to use reflection to do that
[00:40]<sdnffdxdlld>I do it in my DAL ^_^
[00:40]<txnjzd>kober: you can't just do method<object>() ?
[00:40]<cj2nz>No, what i'm trying to do is be able to pass in a type and if it return the default value for that type
[00:40]<cj2nz>so I want to use the default() method thats built into C#
[00:40]<cj2nz>but to do that I have to pass in the type to it
[00:41]<vxznrm_>look at SYstem.Nullable<T>
[00:41]<txnjzd>is using the activator class an acceptable alternative?
[00:41]<vxznrm_>default() wraps that
[00:41]<cj2nz>Theory, yes :]
[00:42]<sdnffdxdlld>well then you'll need to get the MehodInfo of the method and then .MakeGenericMethod() or something like that iirc
[00:42]<sdnffdxdlld>MethodInfo
[00:43]<cj2nz>I was thinking I might just have to create a big switch statement on type
[00:43]<cj2nz>and then be like case int : return default(int)
[00:43]<sdnffdxdlld>yeah that would be a better performing option
[00:44]<sdnffdxdlld>can you switch on a generic type? I cant rememeber if you can or not
[00:45]<cj2nz>yeah but the problem i'm having is you can't pass a method into a generic type method
[00:45]<cj2nz>so you can't do like Method<obj.GetType()> or Method<typeof(Type)>
[00:46]<cj2nz>it has to be the actual Type
[00:46]<cj2nz>which I don't know :P
[00:47]<cj2nz>bah can't switch on types either
[00:47]<cj2nz>has to be integral type
[00:47]<txnjzd>Activator.CreateInstance(type) ?
[00:49]<cjmgrug>sup people!
[00:49]<cj2nz>Hi
[00:52]<sdnffdxdlld>hi CodeRun :)
[00:52]<sdnffdxdlld>kober: yeah Theory is right, the activator class is probably the way to go
[00:52]<cjmgrug>hey smellyhippy, what you upto man?
[00:53]<txnjzd>this calls the default constructor, not sure if this is the same thing as the default value
[00:53]<sdnffdxdlld>not much dude :) just chillin n chattin
[00:54]<sdnffdxdlld>you?
[00:58]<sdnffdxdlld>Time for bed me thinks
[00:58]<sdnffdxdlld>night yall
[01:00]<cjmgrug>night
[01:11]<isnnisnn>is someone familiar here with Matlab or Mathematica ?
[01:21]<rfrs>lol how do you check if ToolStripItem is checked or not? When I validate Pressed property in ItemClicked event I always get TRUE, when I check anywhere else I always get FALSE. Regardless if button is checked or not.
[01:22]<rfrs>In c++ it was a simple task with mfc or just api :p
[01:23]<al->myToolStripItem.Checked should be sufficient
[01:24]<rfrs>That's what I thought... but Checked property only exists in Props window lol
[01:24]<rfrs>Weird
[01:24]<rfrs>Using .NET 2
[01:24]<al->eh? shouldn't.
[01:24]<rfrs>Not even documented
[01:25]<rfrs>In msdn only thing that is used to see if it's checked is Pressed property
[01:28]<al->hmm, well on a ToolStripButton (which is the only checkable toolstrip item that i know of) there is a Checked property
[01:30]<rfrs>um
[01:31]<rfrs>there's a class ToolStripButton
[01:32]<al->ToolStripButton: Represents a selectable ToolStripItem that can contain text and images.
[01:32]<rfrs>It's not documented well, but ToolStripItem has no Checked property, pretty sure of that :P
[01:33]<rfrs>I'm gonna dig out something
[01:33]<al->a ToolStripItem is an abstract class you probably shouldn't be using directly.
[01:33]<rfrs>Yeah...
[01:34]<al->a ToolStripButton can set so it can be checked
[01:34]<al->that is the only ToolStripItem based control i'm aware of that can be checked at all
[01:35]<al->other items are textbox's, combo box's, labels, seperators, and drop down menu's
[01:35]<al->not sure what else there is, but none of those fall into a category for a checkable control.
[01:35]<rfrs>Hm
[01:35]<rfrs>So ToolStripItem is supposed to contain TS Buttons :o
[01:36]<al->eh?
[01:36]<al->read the documentation on a ToolStripButton, that is probably what you want. Have a nice day. :)
[01:37]<rfrs>Yeah I made an error when accessing items lol
[01:37]<rfrs>Thanks hehe
[01:37]<rfrs>Buttons, Items, all looked the same :P
[02:23]<-- dyrnnprd wrs puyv> i mean the other left <-")
[03:01]<zgzzcygnv>http://blog.nwiki.org/index.php/2006/07/16/togglerun-windows-xp-autorun-control/ <-- :D
[03:10]<22vnax>Anyone know how to return a 2d array in a webservice?
[03:11]<rgmznrs_>bbtech, what kind of webservice? soap?
[03:11]<22vnax>yes
[03:14]<22vnax>If I return an Object[] containing a String[] I get --> System.InvalidOperationException: The type System.String[] may not be used in this context.]
[03:14]<22vnax>if I return an Array[] containing a String[] I get --> You must implement a default accessor on System.Array because it inherits from ICollection.
[03:21]<ygvyavus>what is the point of BeginGetHostEntry/AsyncCallback if it just runs in another thread? wont it be easier to just use the blocking version of GetHostEntry in a custom-thread? I am thinking for updating GUI
[03:57]<gjgzr>hi there!
[03:58]<gjgzr>anyone know a way to force NUnit execution order (sample; serialization/deserealization to files tests)
[04:02]<azyfm>GonZa: That would be a bad idea
[04:02]<azyfm>unit tests should never depend on other unit tests
[04:11]<gjgzr>Arild, i got the idea.. so... how to test serialization ?
[04:11]<gjgzr>memory stream ?
[04:12]<gjgzr>instead of files ..
[04:12]<azyfm>That would work
[04:12]<azyfm>but there's no real reason why you can't use files either
[04:14]<gjgzr>mmm but using files and no knowing the test run orden maybe the deseralization test run before the serialization test







