microsoft.public.dotnet.languages.csharp Archive - March 2004
Post a message to this list
Messages
Page: 1234567891011121314151617181920
2122232425262728293031323334353637383940
414243444546474849
C# Equivalent to: For i = 30 To 32 (9 replies)
microsoft.public.dotnet.languages.csharp
I can't find any "short" code to make this work without taking 100s of lines (because I have to keep repeating this process several times). But this is what I have so far: int i 7; do { aryBadCoor.SetValue(i " 25", v); v ; i ; } while (!(i 39)) The VB.NET one is: [code:1:c640d32a4b] For i 7 To 39 .SetValue(i & " 8", v) v 1 Next i[/code:1:c640d32a4b] But I believe the C# code is way too big, is the...
Dependant custom serialization (2 replies)
microsoft.public.dotnet.languages.csharp
Hi, I wish to implement my own serialization scheme, so I implemented ISerializable, and added the needed functions: GetObjectData(..), and the special constructor. The thing is: I need to make a runtime decision inside these functions, and on a given case let dotnet's regular mechanism do the work for me. Is it possible to redirect the runtime from inside these functions, to do his "usual stuff" ...
ADSI in NT40 (2 replies, VIP)
microsoft.public.dotnet.languages.csharp
I'm new with ADSI with .Net. I'm developing a windows application to get the NT group name based on the user id. The application installed successfully on the target computer (OS NT with the latest patch and DSclient). Here is the code: int idx System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString().IndexOf("\\"); string gusernm System.Security.Principal.WindowsIdentity.GetCurrent()...
Comparing Strings (7 replies, VIP)
microsoft.public.dotnet.languages.csharp
I want to compare two strings, in a numeric fashion. e.g.: string a "10"; string b "2"; int comparison String.Compare(a, b); // comparison is now 0, but I want it to be 0 in this case // since 10 is more than 2, numerically Is this possible, without having to write my own comparison method? I can't find an answer anywhere.
implicit operator bool - question 2 (4 replies, VIP)
microsoft.public.dotnet.languages.csharp
Why would you ever want to define both "public static bool operator true" and "public static bool operator false" when you can just define "public static implicit operator bool"? Is there syntax where the two are not equivalent? Or are there cases where you might legitimately want both false and true to return the same value? Fwiw, I'm having a hard time coming up with any C# 1.1 code that calls t...
XMLDomDoc vs XMLTextReader (4 replies)
microsoft.public.dotnet.languages.csharp
I am trying to import some data into my objects and I have been using XMLDoc.LoadXML(file), but someone told me that this is very memory intensive that if I am reading a text file that I would be better off using XMLTextReader. Has anyone had the same experience?
The network BIOS session limit was exceeded (8 replies, VIP)
microsoft.public.dotnet.languages.csharp
I have a C# program that checks directory on a UNIX server and once in a while I get the following error 'The network BIOS session limit was exceeded.' if I log off and log back on the error goes away. Does any one know what is causing this error or how to prevent it? Peter Thanks czupet@wsinc.com
ListView Unbearable (10 replies, VIP)
microsoft.public.dotnet.languages.csharp
Has anyone else noticed ListView's unbearable flickering? I have a project containing a list view with the following: View: Details Columns: 5 The following code causes the list view to flicker: private void TestListView() { const int Num 20; const string Text "Test"; listView.BeginUpdate(); listView.Items.Clear(); ListViewItem[] items new ListViewItem[Num]; for (int i 0; i items.Length; i) { List...
Overloading relational operators (4 replies, VIP)
microsoft.public.dotnet.languages.csharp
Why aren't overloads of relational operators like , , and not restricted to returning a bool type? When would you EVER want to return, say, a double? The best I can imagine, here, is that I might want to compare two numbers for equality and get an Eta object that's basically the difference between the two numbers. This Eta object could have an implicit conversion to bool that would let A B work, w...
Constant string problem (2 replies)
microsoft.public.dotnet.languages.csharp
I have a problem with a header file which was written in C which I need to implement in C#. The header file in C IS something like this, ........ #ifdef cplusplus extern "C" { void WINAPI libmain ( long JobNo ); void * WINAPI getjobfield ( void *vJobRec, short field, short subfield ); }; #endif #define JF CITY 91 #define JF FLEET INITIAL 92 #define JF UFLEET SELECT 93 #define JF CARFLEET 94 #defin...
3D modelling in opengl and c# (3 replies, VIP)
microsoft.public.dotnet.languages.csharp
Hi All, I am new to 3D modelling in VISUAL .NET C#.I am planning to draw the entire roof (showing the roof material, roof angle, roof shape,ceiling shape, ceiling material) of the house and planning to use OpenGL. Please let me know whether I can use opengl with C# and also how to add referance to C# becasue I'm not sure witch namespace to use. and is there any c# sample coding to be found develop...
Saving user prefs, form position, etc (3 replies)
microsoft.public.dotnet.languages.csharp
Hello. I'm developing Windows.Forms based applications, and each will need per user persistent data consisting of user preferences, last form size/position, and the like. Is there a standard or recommended approach to this? I'm aware that such data is often stored in an appropriate HKCU\Software subkey and/or Application Data subfolder. What I haven't figured out yet is if there is some convenient...
wsprintf ? (2 replies)
microsoft.public.dotnet.languages.csharp
Hello Can i use wsprintf in C#? is there any similar function ? Thanx
including .cs ? (3 replies)
microsoft.public.dotnet.languages.csharp
Hello I have classes (definition and body) in several .cs files, each .cs file for each class. How can i 'include' them in my main project, so i could use that class ? Thanx
client server upload file (2 replies)
microsoft.public.dotnet.languages.csharp
i'm planning to develop a client server system the client and server both able to upload picture client will upload the picture to a folder that reside in the server while server user can also upload picture to that folder also and then client and server can retrieve the picture from there. can someone giv some guide to me how to work this out ? i'v been lookin for solution. 1. using sqldatabase t...
format number in a certain format (2 replies)
microsoft.public.dotnet.languages.csharp
Hi all, I want to have a number in a certain format. I took a look in the msdn and was happy to find the format number Function. This works fine. But unfortunately, I can't find the format pattern specification. In the msdn I found some samples like format number(5351,"#,###"), but not a description of the format pattern. Can someone give me a link, where the format pattern is described. Thank you...
.NET *Fails* (13 replies, VIP)
microsoft.public.dotnet.languages.csharp
I've just recently messed with .NET /controls/, and I can't say I'm impressed. Several of them appear to be *highly* inefficient when it comes to screen updates (see my thread "ListView Unbearable" for a major example of this). These tests were run on a *brand new* PC, too. I can't bear to think how badly this would affect slightly older systems. From this I can only conclude that the idea of .NET...
" i = 10 " gives " i == 6 " ?!?!?! (8 replies, VIP)
microsoft.public.dotnet.languages.csharp
Hello, I'm a software engineer for a Dutch company and I am working on the improvement of a already made program and I've found a very curious problem. It consists of two parts, explained below: When one of my functions is called, the program works as it is supposed to do, but when I add a line, say for example: int i; i 10; or something like that, the progam stops executing the function before it...
Replace text in text file (3 replies, VIP)
microsoft.public.dotnet.languages.csharp
Hi, I would like to replace a string to an another into a text file (not a XML). Have someone a example that I can take a look? tia Samuel
using catch (5 replies, VIP)
microsoft.public.dotnet.languages.csharp
Hello All, I have seen code snippets like try { ..... } catch { throw; } What I wonder is that in this type of syntax, how does one log (on the console) the exception before throwing it? since we are not using any name of the exception? Thanks for your help. regards, Abhishek.
OleDBDataAdpter update fails becorse of Fieldname in DB ? (4 replies)
microsoft.public.dotnet.languages.csharp
The update seems to fail becorse of the fieldname in my DB One of the fields is called "Zone" in my MDB If i change the fieldname in both the database and in my test application, the error is gone.... Any explanation ?
CommandBar for VS.NET IDE (3 replies)
microsoft.public.dotnet.languages.csharp
Hi, I want to customize our IDE. I developed some Add ins and would like to create command bar to access them directly. I'm not sure if the term of "command bar" is appropriat. I mean with it a group of icon like the standard one of VS.NET to create a new project or a new element ... How can I to do ? Has someone a link for me? tia Samuel
Including resources in the standard Windows format. (3 replies)
microsoft.public.dotnet.languages.csharp
I want to include icons as resources in my final C# .exe file in the standard Windows format. I added two icons to the project and set their property Build Action to Embedded Resource. This did not do the work. I managed to add the icons with the built in resource editor but I will have to do this manually everytime I recompile the project. Is there an easier solution to this problem?
how to creat a single zip file out of two files (zipping and unzipping functionality) (4 replies, VIP)
microsoft.public.dotnet.languages.csharp
Hi My application creates two files , i have to zip these two files to a a single file, how to use winzip functionality in c#? Is there any builtin functions available with visual c#? the two file are in text and binary formats , is it possible to Zip them and unzip in c#? need help seash
desconexión de usuarios (2 replies)
microsoft.public.dotnet.languages.csharp
Hola Cómo puedo saber el momento que un usuario de Windows ha cerrado la sesión?. La implementación de ésto debe ser desde un servicio de Windows que corre bajo la cuenta de Sistema Local. Muchas gracias por su ayuda
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