microsoft.public.dotnet.languages.csharp Archive - November 2001
Post a message to this list
Messages
Page: 123456789101112131415
Formatting string data (2 replies)
microsoft.public.dotnet.languages.csharp
Hi All , I need to format a string. For example "123456" as "123 456".How to do that? I'm using c# Thanks
Comparing Perl and C# regular expressions (5 replies)
microsoft.public.dotnet.languages.csharp
I am trying to compare perl and C# regular expressions. We use Perl regular expressions a ton, the problem is there is only two of us that know perl so I am exploring the posibility of writing an app with built in expressiosn and an expression builder. Here is my perl script: unless (open (INPUT, "e:\\ltt xref E.txt")) { die ("cannot open output file Sarnia.csv.txt\n"); } unless (open (OUTPUT, " e...
string in to a byte array (3 replies)
microsoft.public.dotnet.languages.csharp
I want to convert a string in to a byte array. What is the best way to do this? What I want to do is use the MemoryStream object on a large string. If there is no easy way to convert a string to a byte array is there a way to stream a string? Deveng
How does .NET do it? (3 replies)
microsoft.public.dotnet.languages.csharp
How the heck does the Panel control adjust the client coordinates inside it by the size of the border? If there's a Fixed3D border, (0, 0) is not on the border, but rather inside the border. How is this accomplished? When writing components I need (0, 0) to be reported inside the border, if any. I am writing a grid picture box where the mouse coordinates are important. Nate
Type Conversion (5 replies)
microsoft.public.dotnet.languages.csharp
Hello Everyone, Can anyone tell me how to convert a SQL Server timestamp column to a string and vice versa using C#. Thanks in advance. Regards, Michael Wong
Draw selection rectangle (4 replies)
microsoft.public.dotnet.languages.csharp
I want to draw a dynamic rectangle on a picturebox that has an image. The rect starts at the mouse down point and changes in size with the mouse move, like a selection window. I am doing this: private void picMain MouseDown(object sender, MouseEventArgs e) { startX e.X ;startY e.Y; } private void picMain MouseMove(object sender, MouseEventArgs e) { Graphics g Graphics.FromHwnd(picMain.Handle); Pen...
c sharp - Formating the a form in a new way... (2 replies)
microsoft.public.dotnet.languages.csharp
Hello, I see in a episode of .NET Show how a guy make a window in a circle and then, make it "transparent". How can i do this using c sharp? I know that the transparent effect is made by using the opacity property, but it dosen t work from the VS .NET IDE... Thank you in advance. carlos
Difference between this.Method and Method when creating an instance of a Delegate? (4 replies)
microsoft.public.dotnet.languages.csharp
When I'm creating an instance of a delegate that references an instance method, should I be using the 'this.' qualifier. If I remember correctly, it's not required and I usually leave it out. Is there a difference? (Note: I understand the difference if I actually intend to use a static method) Thanks, Eric
Exceptions on Timer Events (2 replies)
microsoft.public.dotnet.languages.csharp
When an exception occurs in some event handler of yours, and the event is triggered by the CLR (like a timer), it doesn't break in the code. Instead it pops up a dialog saying that an unhandled exception occurred in the framework. Of course I want it to break in my code so I can analyze local variables etc. I know that I can make ALL exceptions be caught and break in the debugger, but then that br...
updating properties (3 replies)
microsoft.public.dotnet.languages.csharp
How does one force a property to update when a different property has changed and that change affects another property. For example: if I change CardValue in the property inspector to 22, the suit should change to diamonds. is there a way to do this w/o breaking the functionality out into separate methods and calling the methods from different locations? Can I call the getter and setter methods di...
Control Array? (5 replies)
microsoft.public.dotnet.languages.csharp
Is there equivalent for a control array (like in VB6) in C# WinForms? Basically, I want to dynamically add buttons at runtime that all do similar tasks.
API function: How to use sndPlaySound() in XP ? (2 replies)
microsoft.public.dotnet.languages.csharp
Hi On Win98se this function works fine: sndPlaySound("sound.wav", SND ASYNC); On XP instead of "sound.wav" the Windows standard sound is played?! What goes wrong? TIA p
Getting software build number (2 replies)
microsoft.public.dotnet.languages.csharp
I want to programmatically get the assembly version number of my c# program. Can anybody show me how? The number that I'm interested can be found by right clicking on a C# executable and going to the Version tab, its the "Assembly Version" value. I think you have to use the AssemblyInformationalVersionAttribute class. The docs look fuzzy, can anybody provide sample code? TIA
C# Comments (10 replies)
microsoft.public.dotnet.languages.csharp
Hi, Addressed to Microsoft... C# I have just finished looking at the basic language features and have yet to look at the framework class library or Windows and Web Forms. Quite a lot of thought seems to have gone into C#. You've taken the best bits of Java, C , Visual Basic (and Delphi, I guess) and have either simplified or improved on them. I'm impressed with the way you've made enumerations bet...
PadRight() (2 replies)
microsoft.public.dotnet.languages.csharp
Does anyone know the proper sytax for using PadRight(). I've tried string myString "Try this"; Response.Write(" br //" myString.PadRight(50) "//"); The string appears but there is no padding when I try Response.Write(" br //" myString.PadRight(50,"*") "//"); I get the following error The best overloaded method match for 'string.PadRight(int, char)' has some invalid arguments. Any suggestions would...
deserialize (5 replies)
microsoft.public.dotnet.languages.csharp
Following code will serialize struct x to file t.bin: [Serializable]struct X { public int a, b, c;}; X x; void foo() { Stream s File.Open("t.bin",FileMode.Create); BinaryFormatter bf new BinaryFormatter(); bf.Serialize(s,x); s.Close(); } Many moons later my struct X has changed (has more members) [Serializable]struct X { public int a, b, c, d;}; How can I deserialize file t.bin back into new x?
Sorry I have to say this about C# (23 replies)
microsoft.public.dotnet.languages.csharp
First off I love .NET...This isnt a bash on it... Just a little light hearted annoyance... We have a new .NET project to work on......This makes 6 for us so far....Yea... This will be the first one that has been mandated to be C# (Government mandates)... So I learned C# after PDC last year but since Beta 1 have been back in VB.NET camp (Even wrote a book on it...Plug...Plug)... But man if you like...
How do I copy a Form's image to a bitmap? (3 replies)
microsoft.public.dotnet.languages.csharp
Greetings all, In C#, how would I copy a Form's image onto a bitmap? Or (I should ask) is a "bitmap" the proper place to copy it to? Also, since the Form in question can change in size is their some "trick" I should know about? Must I always "readout" the form's size, and adjust my bitmap's size accordingly? Or what? Thanks guys, Stan Shankman
operater overloading (7 replies)
microsoft.public.dotnet.languages.csharp
It would appear that it is not possible within C# to overload the operator. All other operators are able to be overloaded (although it must be done in their idiotic fassion) but not . Has anyone found this to be wrong? Hopefully? Also as far as I can see it's not possible to use references to arguments when doing overloaded operators. ex public static Test operator (Test lh, Test rh) { return new ...
how to write __FILE__ and __LINE__ in C# (6 replies)
microsoft.public.dotnet.languages.csharp
Hi. Can somebody tell me is there anything in the C# precompiler like FILE and LINE like in ANSI C? So how can I print logs including the actual filename and linenumber? Thanks, Steve Albert
Object instanciation with typeof (2 replies)
microsoft.public.dotnet.languages.csharp
Can an object be instanciated in C# by it Type? Example: public Object CreateMyObject(Type MyType) { Object MyObj; MyObj new MyType; return MyObj; }
problem with selecting an item from a listbox (2 replies)
microsoft.public.dotnet.languages.csharp
I have a problem with selecting an item from a listbox. When I try to use a selected item, I get an error message saying "value null was found where an instance of an object was required". He doesn't find the selected item. It's written in C#... Is there anyone who can help me ? public void childleftontop (object sender, EventArgs e) { TabsDB tabpos new TabsDB(); DataSet DS Tab new DataSet(); int ...
Filestream Object (2 replies)
microsoft.public.dotnet.languages.csharp
I'm trying to access Text files across multiple servers from webpage . When I tried to open and read using Filestream object , I'm getting access denied error.Is there anyway to read those files from a web page?
Delphi vs. C# (45 replies)
microsoft.public.dotnet.languages.csharp
Hi all. I have a customer interested in learning C# and is now progrmming Delphi. He wants to know what are C# benefits over DELPHI. Can anyone tell me whats MS official standpoint on this? Thanks.
Jpeg resizing... (6 replies)
microsoft.public.dotnet.languages.csharp
Is there a way to open upa jpg using C#, resize it, and save it again in a different file? On first thought, it sounds complicated, but you never know the wonders of C#. Cliff
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com