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.23 MB
Powered by
Channel Info
Network: freenodeChannel: #csharp |
Search in www.irclog.org
Log from #csharp at freenode 2006-06-28
[18:02]<zyccus>thanks for that statement
[18:09]<su2zgzzc>Do I need to set execute permission on batch files (when I write to them using a FileStream)?
[18:10]<zj2nzv2>If you're talking about a regular .bat file in Windows, you shouldn't need to.
[18:16]<svzz[wjzc]>hey guys little question about the Sysem.Net.Mail.MailMessage... the .To, the .Bcc and the .CC are all readonly fields... i can set the .To by using the Constructor but how do i set a Bcc and CC ???
[18:17]<rjjgwq>Bcc.Addresses.Add() or something one sec
[18:17]<rjjgwq>Bcc.Add() sorry
[18:18]<rjjgwq>Bcc is just a MailAddressCollection
[18:18]<svzz[wjzc]>oh... i didn't think of checking if they had members
[18:18]<svzz[wjzc]>dumb me
[18:18]<rjjgwq>I believe .To, and .CC are the same
[18:18]<svzz[wjzc]>thanks
[18:18]<vxznrm>yay
[18:21]<-- sgvgzs xzs fuyv (>/dev/brain")
[18:26]<rjjgwq>I have a partial class named Foo that has a private member called bar. I create another file Foo that is the other "part" of the partial, but I can't access bar ?
[18:28]<dyguw>MessageBox.Show(...);
[18:29]<dyguw>Read the docs on MSDN
[18:30]<dyguw>Depends on what you put inside the (...).
[18:34]<sdnffdxdlld>theres alot of options for MessageBox.Show
[18:34]<ygjgj>if I have no threads in my VS2003 debug window does that mean only the main one is running?
[18:35]<dyguw>Steve^: Next time you assume something, read the damn documentation,.
[18:36]<dyguw>Apparently not, since you thought MessageBox.Show(); was for simple OK dialogs.
[18:38]<dyguw>Do that.
[18:38]<dyguw>I don't give a shit about your hours. Mine are more important to me.
[18:38]<cjmgrug>anyone care enough to give a brief lecture on 'events and delegates' .. to understand what a coder needs to know and thus eliminating all the bullshit in the books ?
[18:39]<sjlx>:D
[18:39]<sjlx>CodeRun: it's quite a very compact topic. just have a look at several web ressources.
[18:40]<cjmgrug>i've looked at http://www.codeproject.com/csharp/delegates-part1.asp and i got lost halfway through
[18:41]<sjlx>well well well. but i just have no time now for Q&A
[18:44]<lcs>CodeRun: delegate its something like a reference/pointer to function
[18:45]<lcs>CodeRun: when event occures all delegates that were set to handle it, are executed
[18:46]<lcs>example, you have class that downloads stuff from the net, it takes very long time to download, so you run it other thread
[18:47]<lcs>when the download finishes, your class should somehow notice you that file has been downloaded, the best idea is to fire event
[18:47]<lcs>if you happen to handle downloadFInishedEvent (or whatever you called it), then code handling this event (a delegate which you have set before acutaly starting download thread) will be executed
[18:47]<lcs>thats all
[18:48]<lcs>you only have to read about the semantics :)
[18:48]<sdnffdxdlld>CodeRun: you'd be best just looking into events for now .. they'll do what you want ... form what i've seen most resources on delegates explain them in such a crap way
[18:48]<sdnffdxdlld>from
[18:48]<svzz[wjzc]>hey guys do you know if there's any built-in function in C# .NET 2.0 / ADO.NET 2.0 that would work like VBA's "Nz(object, value)" function... its behavior was to check if object was null, if not return it, if so, return the value
[18:50]<rjjgwq>what about if( myobject == null ){ do something, or don't } ?
[18:50]<cjmgrug>hey thanks a lot pks and smellyhippy..
[18:51]<cjmgrug>pks, suppose i have an IRC class, and its instance recieves a message from the server, how would it update the RichtextBox on my main form?
[18:52]<lcs>ok, here it goes
[18:52]<svzz[wjzc]>goon12 yeah i know but i was wondering if there was a built-in function doing it
[18:52]<lcs>in the method that recives the message from the irc server, you have to fire event
[18:53]<lcs>it goes like: if(this.onMsg != null) this.onMsg(message_body);
[18:53]<cjmgrug>so, onMsg is an event of the richtextbox?
[18:54]<lcs>no, of the irc class
[18:54]<cjmgrug>ok..
[18:54]<lcs>now you have to handle this event somewhere in the code
[18:55]<muvrayjg>does someone knows how to do cabs? im in VS and i make a project under C# smartdevices..but i cant find a menu that can generate a CAB
[18:55]<cjmgrug>hmm
[18:55]<lcs>IrcClass irc = new IrcClas(); irc.onMsg = new irc.onMsgHandler(somefuntiontohandle); irc.work();
[18:56]<lcs>void somefuntiontohandle(string message_body)
[18:56]<lcs>{
[18:56]<lcs>this.richtextbox.text = message_body;
[18:56]<lcs>}
[18:56]<cjmgrug>hmm ok..
[18:56]<lcs>so, when you fire event, all function what were added to handle it get executed;
[18:57]<lcs>actuly there should be irc.onMsg += new irc.....
[18:57]<lcs>because you add new delegate :)
[18:57]<cjmgrug>ah i see
[18:58]<cjmgrug>alright .. i 'll try playing around with it. Thanks man :)
[19:05]<sdnffdxdlld>hmmmm codeplex looks good
[19:07]<muvrayjg>hi, how can i generate cabs in under C# smartdevices
[19:17]<affusffus>hi
[19:19]<su2zgzzc>The CreateSubKey in the RegistryKey class speficies that null is returned if the operation failed, but also notes that various exceptions are thrown on certian failures. So when can the return value be null?
[19:21]<affusffus>someone there who use asp.net?
[19:22]<su2zgzzc>And whats a good exception to throw if something bad happened, but I can't determine exactly what it was
[19:23]<azyfm>throw new IHaveNoClueException();
[19:24]<su2zgzzc>Hrm... don't see that one in the standard library
[19:24]<azyfm>weird
[19:25]<su2zgzzc>Its more of the lines to throw new WhatIsThisComputerSmokingException()
[19:25]<azyfm>if its something that should never happen, just assert instead
[19:26]<su2zgzzc>Its not that it should never happen, its just that the computer is really screwed up if it does
[19:26]<azyfm>make your own exception then
[19:26]<su2zgzzc>How do you assert in c# though?
[19:27]<lcs>invalidargumentexception
[19:27]<azyfm>System.Diagnostics.Debug.Assert(true == false, "true should never be false!!!!!!!");
[19:27]<zgmz19s>hoho
[19:27]<su2zgzzc>pks: that says that whoever called the method passed invalid arguments
[19:28]<su2zgzzc>What I want is more like InvalidStateException
[19:28]<azyfm>so make your own
[19:28]<lcs>ProgrammerFuckedUpException()
[19:28]<azyfm>in VS 2005: type 'exception' and press TAB twice
[19:29]<lcs>acutaly, if its something that should not ever happen, you should do hat Arild said
[19:29]<lcs>had*
[19:32]<su2zgzzc>It would be something to the lines of getting the OS version and finding the major version was negative
[19:32]<azyfm>that'd be an assert, I'd say
[19:33]<azyfm>if you should validate that kind of info at all
[19:33]<azyfm>I wouldn't, unless an invalid value had really bad consequences
[19:33]<su2zgzzc>an invalid value in my cause would cause a NullReferenceException
[19:40]<azyfm>I'd just live with that
[19:47]<cfudsd>kog: what would you do if you got a job that blocked access to IRC?
[19:49]<dyguw>I want a timer plugin to VS2005 that is stopped when I am not actively using the window... so I can time projects.
[19:50]<cfudsd> basically recording inactive time when no keys are pressed and the mouse isn't moved
[19:50]<cfudsd>?
[19:51]<mycnw>Sounds like you want to find out how long you've spent coding
[19:52]<su2zgzzc>why isn't: const Type t = typeof(string) allowed :(
[19:58]<txnjzd>there are apps out there that time how long you spend in different apps







