all groups > c# > october 2006 > threads for monday october 2
Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
a = a++
Posted by Mugunth at 10/2/2006 11:38:44 PM
Can anyone de-mystify this?
I wrote a C# program, the entire code is shown below.
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int a = 0;
... more >>
Command-line Program
Posted by Jeroen at 10/2/2006 10:41:23 PM
Can anyone recommend a book or tutorial about programming a command
line tool? I need to build a .NET C# tool that starts some batch
processes, so some info on how to build a nice syntax for the tool
would be nice.
-Jeroen
... more >>
Stream large file in WSE 3.0
Posted by Hardy Wang at 10/2/2006 9:33:44 PM
Hi all,
I am new to WSE 3.0, and currently reading the document shipped with
installation. From sample provided (see below), I created WSE service side
code, but how can I consume stream returned by web method in my Web Form
application? I already configurated web.config of my web service... more >>
position of modal form
Posted by Govert J. Knopper at 10/2/2006 8:53:32 PM
Here's my C# newbie question:
How do I set the position of a modal form?
This (correctly) positions top left of the form at the position of the
main form:
....
Form frmAbout = new About();
frmAbout.Show();
frmAbout.Left = this.Left;
frmAbout.Top = this.Top;
....
But this doesn't wor... more >>
VB to C# converter
Posted by esha at 10/2/2006 8:16:29 PM
I tried several online converters. In many case they do the job, but
sometimes give some mess. I think that all converters I know are old, were
created for VS 2003 and do not understand new stuff from VS 2005. For
instance this block containing Using was not converted by anyone:
Public Shar... more >>
NUnitASP and the SessionState
Posted by Nate at 10/2/2006 7:49:02 PM
All,
I have started using NUnitASP to write test cases for an ASP.NET
application. It works great, but some of the assertions that need to be made
depend on values stored in the Session. The problem is that NUnitASP
basically acts as a client to webforms and simply abstracts the HTML emit... more >>
Is this safe
Posted by Michael Chambers at 10/2/2006 7:07:03 PM
Hi there,
I have a worker thread that may need to display a dialog for the user. Is it
safe for the worker thread to invoke the form's constructor and then pass
the form's reference to the main GUI thread where "ShowDialog()" will then
be invoked. I assume it probably is since the form is n... more >>
Nullable<Int32> on heap or stack?
Posted by Jon Davis at 10/2/2006 4:26:55 PM
Are nullable primatives stored on the stack, i.e. as a struct, or on the
heap as a reference type?
Jon
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
foreach help
Posted by esha at 10/2/2006 3:38:23 PM
I tried to translate VB code for FOREACH and got this result:
public static string GetUnauthorizedUsersCount() {
MembershipUser objUser;
MembershipUserCollection objUserCollection = Membership.GetAllUsers();
MembershipUserCollection objUsers = new MembershipUserCollection();
... more >>
getting started with windows services
Posted by michael sorens at 10/2/2006 3:24:56 PM
(1) I tried to use what seems like a standard line (from Walkthrough:
Creating a Windows Service Application in the Component Designer at
http://msdn2.microsoft.com/en-us/library/zt39148a.aspx):
if (!System.Diagnostics.EventLog.SourceExists("MySource")) { ...
But received this error whe... more >>
How do I assign null to an integer?
Posted by susan.fitzpatrick NO[at]SPAM cubic.com at 10/2/2006 3:00:57 PM
In C# integers are automatically intialized to zero. I need to assign
null to an integer (i.e. int i = null).
I cannot use Nullable Types because that is a feature in .NET 2.0 and I
need to use .NET 1.1.
Thanks
... more >>
Is there a clean way to create a byte[] from an HttpWebRequest.Read?
Posted by John Wilmot at 10/2/2006 2:59:15 PM
The following code-snippet works but is just not elegant, IMO.
Does anyone have a recommendation to make this more efficient?
For example, I prefer NOT to have a static "buf" size. In fact, I would
prefer something similar to StreamReader.ReadToEnd() for returning a string,
but into a byte... more >>
BackgroundWorker and events handling
Posted by Hardy Wang at 10/2/2006 2:32:32 PM
Hi all,
I am migrating a Windows Form application from .Net 1.1 to 2.0. I try to
use BackgroundWorker object to handle a very lengthy process.
I have a separated class to handle some very complex logic. In .Net 1.1,
I create some events inside this class to notify WinForm the status of... more >>
Treeview from Top to Bottom
Posted by John at 10/2/2006 2:32:32 PM
Is it possible to change the Treeview style so the treeview starting
from Top to bottom instead
of Left to Right (parent-child node) ? or is any third party software
control can do that?
Please advice.
Thanks.
John
... more >>
Microsoft outlook program
Posted by DBC User at 10/2/2006 2:01:05 PM
Hi All,
I am interested in writing an app or add-in for MS Outlook (I don't
have any previous experience in this area). My main objective is
following
1. I want to manage who are the people who need to be notified.
2. I want to create a groups of people as a part of 1.
3. Each group will h... more >>
how to open a project from visual source safe?
Posted by DBC User at 10/2/2006 1:26:39 PM
I have a project staged in source safe. What is the right way to open
the project from source safe and get all the depended files on to my
local pc? I do not have the project locally in my PC. I am trying to
get it in a right way.
Thanks in advance for the help.
... more >>
Can C# Express 2005 target .Net 1?
Posted by pkirk25 at 10/2/2006 1:13:18 PM
I want my app to be able to run on PCs without requiring a .Net 2
download.
Can C# Express 2005 be set to create applications that work with .Net 1
even if it requires .Net 2 to run itself?
... more >>
System dpi
Posted by Steve Long at 10/2/2006 12:53:03 PM
Hello,
can anyone tell me how to detect a system's settings for dpi settings on the
display properties dialog? For instance, it can be set to:
Normal (96 dpi)
Large size (120 dpi)
or
Custom size.
I'd like to do this on application start up and then just run with whatever
setting I find a... more >>
MS Enterprise Library
Posted by bungle at 10/2/2006 12:15:38 PM
Hi,
I have started using MS Enterprise Library for the data access layer
and found it great. I have changed to coding on another machine though
and didn't think it necessary to a full install of the Enterprise
Library. This caused a problem that the following article solves:
http://scottonw... more >>
Thread-safety analyzer/simple guidelines
Posted by Warren Sirota at 10/2/2006 11:52:02 AM
Hi,
I've got a method that I want to execute in a multithreaded environment
(it's a specialized spider. I want to run a whole bunch of copies at low
priority as a service). It works well running as a single application.
I was wondering if there is a "Thread-Safety Analysis Wizard"?
I'm ... more >>
MS Access parameterized reports
Posted by elena at 10/2/2006 11:29:01 AM
Hi, All
I need help:
I have VS .NET 2003 version 1.1 (C#) and MS Access
What will be the best way to create parameterized reports?
Please, help
I don't know where to start, any linkss to this topic will be appreciated
... more >>
App Settings for assemblies.
Posted by Chris Dunaway at 10/2/2006 10:55:18 AM
I have an .exe console project and a class library project as part of a
solution. The .exe has an App.config file and I have used the Settings
page to add some Application level settings.
When I try to retrieve a setting using this code:
//Method 1
string s = ConfigurationManager.App... more >>
Passing Events from a user control to a form using the user control
Posted by Guy Noir at 10/2/2006 10:25:22 AM
I have a quick question on custom controls.
I have a control that I created with a class that extends the
NumericUpDown control.
My problem is that when I use this usercontrol on my form, the click
event gets handled by the user class. I want the event to be passed to
the Windows form (not ... more >>
Sequential file access in C# [Net 1.1]
Posted by nostradumbass77 NO[at]SPAM yahoo.com at 10/2/2006 10:09:15 AM
I am building a custom utility application and need to read and write
structures to a disk file.
It was simple in Visual Basic using Types to define the structure and
then
using Put to write it to file / Get to read it.
Is there any component / class library developed for use with C# ?
... more >>
Can I use ADO logic with Visual Studio 2005 Express?
Posted by Steve B at 10/2/2006 9:05:02 AM
I installed the Express version of both VS and SQL. But from VS Express I
can not see the SQL tables. I can not create an ODBC link to SQL Express
either.
I have no problems doing this using VS 2002 Ent and SQL Server 2000 Ent.
According to this page I should be able to do that...
http:... more >>
How to get source code during exception?
Posted by samtilden NO[at]SPAM gmail.com at 10/2/2006 8:45:33 AM
During my code's processing of an exception, I would like to format the
exception myself.
I can get almost everything (I can get exception itself, stack trace,
file name, line number, method, parameters) but cannot seem to get the
source code where the exception occurred.
The ASP.NET except... more >>
Application.DoEvents() triggers exception!
Posted by james.jdunne NO[at]SPAM gmail.com at 10/2/2006 7:47:54 AM
System.ArgumentException: Item has already been added. Key in
dictionary: "-1" Key being added: "-1"
at System.Collections.Hashtable.Insert(Object key, Object nvalue,
Boolean add)
at System.Collections.Hashtable.Add(Object key, Object value)
at
System.Windows.Forms.ComponentManager.... more >>
serialization shared memory problem
Posted by norvinl NO[at]SPAM yahoo.com at 10/2/2006 7:35:50 AM
Hi,
I'm serializing a class and using shared memory / deserialization to
send it to other processes.
I can serialize with one app and deserialize with another instance of
the same app.
But if I try to deserialize with another different app, I get an
exception (the assembly RegionViewer i... more >>
How can I zip a 8 Gb file using c# ?
Posted by MrNobody at 10/2/2006 7:08:01 AM
I need to zip up an 8Gb file using C# - do you know of any freeware libraries
I can use to accomplish this? I guess it needs to be Zip64 to support such
file sizes.
I tried something called sharpziplib but it doesn't support >2Gb files -
they are working on it however but I cannot wait...... more >>
Winforms and objects
Posted by Mike at 10/2/2006 6:09:11 AM
Hi All,
Is there a good book or paper on conceptualizing Winforms as objects?
In object-oriented programming I don't find it diffiucult to see
"student", "person", or "car" as objects, but I do have problems
conceptualizing a "form" and controls on forms as objects and how they
fit together. ... more >>
console project question
Posted by sgr at 10/2/2006 4:55:01 AM
Is there any way to do that C# always writes in the same line of the console? ... more >>
Adding existing project into current project sub folder
Posted by Sala at 10/2/2006 2:26:52 AM
Hi creative thinkers !
I have one project in C# .. that project name ewaoNET . Now
i will shifted into another project sub folders....
My current Project :
Cititown
Now i will use existing ( ewaoNet ) project in to Dating folder...
This ewaoNET project using custom control... more >>
storing items in list/collection by an ID key
Posted by Macca at 10/2/2006 2:25:01 AM
Hi,
I have a number of objects i would like to store in a list like struture.
They already have ID's associated with them so i would like to utilise these
ids as accessors the list..
At the moment I have approx 10 objects with ids that are spread out,
e.g 1, 12, 24, 56, 200,320....
... more >>
CSharp Equivalent of VC++ char?
Posted by Chris Ashley at 10/2/2006 1:09:01 AM
How can I implement a byte in CSharp that works the same as the char in
VC++ 6? EG: With the range -128 to 127? The standard byte has the range
0 to 255, and the CSharp char is too long (16 bits).
... more >>
Click once and .net 2.0
Posted by Daniel at 10/2/2006 12:46:39 AM
Hi guys
I have a clickonce deployment, with .net 2.0 as a prerequsite in the project
settings.
But when i tried to install from my publish.htm page on a non .net 2.0
machine it was unable to install. I installed .net 2 and it worked.
So why the .net 2 prereq as it doesnt do anything??? ... more >>
Void/function on a class which is an array
Posted by Oyvind Eriksen at 10/2/2006 12:00:00 AM
Hello.
Look at the code below.
I'm trying to create a function/void for when a class is declared as an
array.
Is it possible? If so, how?
Regards,
Oyvind Eriksen
public class Main
{
SomeClass[] array = SomeClass[10];
array.MyVoid(); <--- how do I create this void?
}
publ... more >>
Null structs
Posted by S. Lorétan at 10/2/2006 12:00:00 AM
Hello.
I have some structs in different namespaces/classes/other structs and I
sometime have to check if it contains something or not.
myStruct == null doesn't work.
I've currently done it by creating a IsNull method in my structs:
struct TestStruct {
public int Value;
publ... more >>
web sreaming?
Posted by Fabio Z at 10/2/2006 12:00:00 AM
Hi all,
Someone can tell me how can I realize a streaming via web such as whose of
some radio?
Thanks!
... more >>
VGA sizes - bug in CF?
Posted by Hilton at 10/2/2006 12:00:00 AM
Hi,
MessageBox.Show (new TextBox ().Height.ToString());
MessageBox.Show (new ComboBox().Height.ToString());
gives 20 and 20 in non-VGA mode and 20 and 40 in VGA mode. Seems like the
CF does not set the height of textboxes correctly in VGA mode (using
res2exe). This means that textboxes ... more >>
WaitForExit( 1 ) never returns
Posted by Ebbe Kristensen at 10/2/2006 12:00:00 AM
Hi All
I am writing a C# program that starts another program. Since this is
destined to run on an un-attended PC, I want to be certain that my program
can regain control. To this end, I use the WaitForExit methos with a
timeout.
So in order to test this, I added an endless loop to the ot... more >>
|