all groups > c# > april 2005
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
Forcing ThreadPool threads to act like they are not background threads
Posted by orekinbck NO[at]SPAM yahoo.com.au at 4/30/2005 10:19:10 PM
Hi There
I have been programming C# for a couple of months and am trying to
master Threading.
I understand that ThreadPool uses background threads (see code example
in MSDN page titled 'ThreadPool Class [C#]') .... however I would like
to ensure that all my ThreadPool threads have completed... more >>
Using Reflection With Nested Classes
Posted by Robert W. at 4/30/2005 9:04:04 PM
I've almost completed building a Model-View-Controller but have run into a
snag. When an event is fired on a form control I want to automatically
updated the "connnected" property in the Model. This works fine if all of
the properties are at the top (root level) of the model but I'd like to ... more >>
Good lord, when do I get to actually program?
Posted by John Salerno at 4/30/2005 8:54:58 PM
Ok, I've been reading an intro book to C# and I'm learning a lot of the
basics. I can follow along with all the sample code and understand
exactly what it's doing, but I know there's no way I'd be able to write
the code myself.
Also, it seems like every time I come here, or read info online... more >>
not getting user control Property after it's set
Posted by derek_heasley NO[at]SPAM hotmail.com at 4/30/2005 7:05:20 PM
Thanks in advance. I have a user control on a aspx page. i pass a
querysting to the aspx page and set the property to that value. I see
this happen when I step through. This happens first. Then as the user
control loads the property isn't set. Why would the value not be there
after I just ... more >>
parsing strings
Posted by laimis at 4/30/2005 5:41:34 PM
Hey guys,
ever since I started programming, i used to parse strings using methods
such as find the index of the delimeter, extract the string using substring.
Now i was thinking that regex could be of use here and might work even
better with its Match class.
Which method do you think is... more >>
C# v2.0 Iterators and the Visitor design pattern
Posted by Wavemaker at 4/30/2005 5:16:08 PM
I've been playing with C# v2.0 today, and having quite a bit of fun. The
new version has added iterators. The iterators are coded directly into
the class to be iterated. For example:
public IEnumerable<int> Visit(SomeVisitor visitor)
{
int position = 0;
for(int i = 0; i < Count; i+... more >>
TreeView selecting nodes via code
Posted by JoKur at 4/30/2005 4:53:01 PM
I'm currently using a context menu to allow the user to add, rename and
delete nodes in a treeview control. When a node is added we give it a bogus
name ("NewNode") and invoke the add method. We would then to then select the
newly added node and rename it but can't figure out how to select t... more >>
Get One Value From DataTable
Posted by Jordan Richard at 4/30/2005 2:03:29 PM
I'm just wondering if there is a faster way (better performance or fewer
lines of code) to retrieve one single value from a DataRow.
Here is what I'm currently doing when I just need a single integer value
from the DataRow:
int someID = 0;
if (DT.Rows.Count == 1) {
DataRow DR;
DR = DT... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
How to determine which button was pressed in OnValidating event.
Posted by Vern at 4/30/2005 1:01:42 PM
I have a custom control which has it's own OnValidating event handler. I
would like to skip the validations if the Cancel/Exit button is pressed.
Also, if possible, would like to skip the validations if the X was clicked to
close the form. How can I do this?
Thanks,
Vern... more >>
Web Services DNS Round Robin
Posted by JP at 4/30/2005 12:49:09 PM
Greetings - I have a classic ASP site that is accessing custom written .NET
web services - we are looking at scalability options and though we have an
F5 load balancer that would definitley do the trick, I was wondering how DNS
load balancing was handled in such a situation?
That is DNS Res... more >>
C# certification
Posted by -D- at 4/30/2005 11:06:09 AM
Is there a specific track for C# certification? If so, what sequence of
exams would I need to take to become C# certified. I've looked at the MCAD
from Microsoft, but was interested in only a C# certification. The company
I'm working for is pushing for all employees to get certified in at leas... more >>
Walking Inheritance Tree of Loaded Assembly
Posted by Zachary Hartnett at 4/30/2005 9:49:30 AM
I was trying to write a routine this morning that would open a given
assembly, walk the inheritance tree of classes in the assembly, and provide
a list of classes in the assembly that inherit from DataSet.
Here is a snippet from the routine I came up with:
-----------------------------------... more >>
Anybody using VPC for VS2005 Beta 2
Posted by Bob Hanson at 4/30/2005 8:22:17 AM
Hi All,
Anybody using Virtual PC for development in VS2005. I am just checking
to get some views on speed, integrity before I spend time on this.
Thanks in advance,
Bob Hanson
*** Sent via Developersdex http://www.developersdex.com ***... more >>
Where I can get LATEST version of C# 2.0 specification?
Posted by Smarty at 4/30/2005 7:06:05 AM
Please, post a right link. Му current copy dated by May, 2004 and contain
bulk of errors/inexactitudes, at least if check it against C# Express beta 2.... more >>
mimicking a Mac OS X Tiger Feature
Posted by veeralp NO[at]SPAM gmail.com at 4/30/2005 6:12:03 AM
g'day folks,
I was just browsing through some of the features apple's new tiger
operating system. One of the features I found was the invocation of
the dictionary feature implemented in Tiger. Essentially, one would
place their mouse on top of a word they are interested in and they
simply hol... more >>
The Right Collection for the Job
Posted by orekinbck NO[at]SPAM yahoo.com.au at 4/30/2005 1:47:30 AM
Hi There
I have a huge array of objects being displayed on a UI. These are
actually 'jobs' that the users need to deal with before close of
business.
As the operator deals with a particular job, I want to add the unique
identifier for that job to a collection. The collection simply keeps
... more >>
Delegates and threads
Posted by Grant at 4/30/2005 12:00:00 AM
I am having great difficulty understanding this and any code samples I find
online are kilometres long and complicated to understand...Please could
someone give me a simple exampe of how to get a delegate passed to my worked
class so that my main form can update its progress bar? I know it has... more >>
[Question/Feature request]User defined warning for experimential/incomplete functions
Posted by Lau Lei Cheong at 4/30/2005 12:00:00 AM
Hello,
As a programmer, I'm sure many of you have written libraries to do many
of the repeatative tasks, and possibly sharing them with other team members.
In my case, I have about a dozen functions in hand that are either "not
completely tested" or simply "half done", while anothe... more >>
UMLE00501 on dotnet framework delegates when reverse engineering
Posted by Alessandro Riolo at 4/30/2005 12:00:00 AM
[c/p between microsoft.public.dotnet.languages.csharp and
microsoft.public.visio.software.modeling, I don't really know where it
would have to be posted]
I've got a weird thing when reverse engineering a c# project which is
declaring and then using an event of type CancelEventHandler as in ... more >>
[Flags] on enum declarations
Posted by Paul E Collins at 4/30/2005 12:00:00 AM
The help file says that "bit fields [i.e. enums that have the Flags
attribute] can be combined using a bitwise OR operation, whereas
enumerated constants cannot", and yet this code works:
enum Blah { a, b, c }; // without [Flags]
....
Blah x = Blah.a | Blah.b;
So what is the purpose of t... more >>
How can i select all column for each row in DataGrid?
Posted by Erkan KURTULUÞ at 4/30/2005 12:00:00 AM
Hi,
How can i select all columns for each row in DataGrid?
Best Regards,
Erkan
... more >>
Explicit Interface Implementation And Events
Posted by COLIN JACK at 4/30/2005 12:00:00 AM
Hi All,
I've got a situation where I'm implementing an interface (BaseInterface in
example below) and I want to use explicity interface implementation of an
event so that I can add type safety. To see what I mean look at the example
below where the class implementing the interface actually... more >>
Where is the caller?
Posted by Fabio Cannizzo at 4/30/2005 12:00:00 AM
Is it possible to know who is the caller of some running method?
In ogther words, given a method of some class which is running, is there a
way, inside the method, to find out from which namespace the method was
invoked?
... more >>
import vc++ lib file
Posted by Manoj at 4/30/2005 12:00:00 AM
Hi,
How can I import a VC++ .lib file in my c# application
thanks in advance
Manoj Nair
... more >>
Reduce size of soap serialization
Posted by Alexander at 4/30/2005 12:00:00 AM
How to make so that on serialization of object were not added
long Namespace:
xmlns:a1 =3D =
"<http://schemas.microsoft.com/clr/nsassem/LnLists/LNLists%2C%20Version%3=
D1.0.1944.28570%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull>"
And so 100 times for each element=20
Best reg... more >>
How can i Get application Path
Posted by girdhar at 4/29/2005 11:12:03 PM
I have created a project in "c:\myproject\" directory
how can i access this path in c#.
I have a XML File in this same directory and i want to load this file
using xmldom.load method.
... more >>
Application Center 2000 Alternatives
Posted by John Lee at 4/29/2005 11:10:21 PM
Hi,
I do not know where is the best place to post this type of question -
everytime in this case I always choose this group because I think we have a
lots of genius here in this group - seriously!
As you can see the Microsoft seems stopping enhance/improve Application
Center since App Ce... more >>
Question on multicast delegates?
Posted by Hiten at 4/29/2005 9:18:55 PM
Hi
I have created multicast delegates, now i want to point to perticular
reference from delegate to invoke that mathod
how do i do that
please any one know it.....
Thanks
---
Hitendra
... more >>
Saving Classes in Session Variables
Posted by Fred Nelson at 4/29/2005 3:35:40 PM
Hi:
I'm a VB.NET programmer who is attempting to write my first C# web
application. Everything is going VERY well however I have hit one snag:
In the VB.NET world we can easily save classes in session variables. I'm
hoping that I can do the same thing in C# however I'm doing something wron... more >>
Dynamic Buttons
Posted by MikeY at 4/29/2005 3:16:54 PM
Hi Everyone,
Does anyone know where I can get my hands on a sample with source code of a
simple dynamic button control in C# Windows form. I am looking for a sample
that uses a class library that sets the properties send/passed from the main
windows form. I'm having problems with the class ... more >>
text file
Posted by microsoft.news.com at 4/29/2005 2:54:58 PM
Is it possible to read a text file then add a colum in the text file?
example file looks like this:
day1 45
day2 90
day 3
day 4 65
I need to add 45, 90, 0 , 65 all together. i never done this before so i'm
not sure how to do it. Is it even possible, if so does someone have a
sni... more >>
Label Box Wrapping
Posted by Richard MSL at 4/29/2005 1:36:01 PM
I have an application using WinForms under C#. I do not use the IDE, I use
the command line compiler, I build my controls in my application code. The
application generally works fine, except for one small problem: I have made a
user control that has a Label Box to display the prompt. The probl... more >>
How to override event with timeout?
Posted by Brett at 4/29/2005 1:30:10 PM
Say I have an event that will fire on web page load complete. However, if
the page takes more than 30 seconds, I need to abort and take a different
direction to handle this time out. How is this accomplished? How do I time
out against the event more or less?
Thanks,
Brett
... more >>
Listening for an event
Posted by Steve Teeples at 4/29/2005 1:18:04 PM
I have a question on event handling. Here is my situation.
I have a main form which has a TreeView control containing nodes whose tags
contain class instances of test cases. As I traverse through the list of
nodes executing these tests one of the tests needs to fire an event. I need
that... more >>
Stream WAV file to and from SQL Server
Posted by csharpnewbie via DotNetMonster.com at 4/29/2005 1:09:55 PM
Hi
I would like to save a WAV file to my SQL Server DB. What is the best
datatype to use on the SQL Server side ? Image ? Binary ? nVarchar ?
Also, how do I load it to and from my StoredProcedure ?
Thanks... more >>
*Dependent* Unmanaged Resources, Dispose and finalizers
Posted by Fernando Cacciola at 4/29/2005 12:27:36 PM
Hi People,
Consider the following:
class A : IDisposable
{
public A ( Stream aResource ) { mResource = aResource ; }
public void Dispose()
{
if ( !mDisposed )
{
Dispose(true);
GC.SuppressFinalize(this);
}
}
protected virtual void Dispose( bool a... more >>
using collectionbase derivative as datasource
Posted by David J Rose at 4/29/2005 12:21:25 PM
If I define my own classes for an object "Test" and a collection of those
objects "TestCollection", what do I need to add to the class to let me set
the collection as a datasource for a listbox and have it automatically
update whenever an item is added/edited or removed from the collection?
... more >>
Source Tree Structure
Posted by pearsons_11114 at 4/29/2005 12:14:03 PM
Newbie to .NET from Java, have a question about requirements/conventions for
source tree layout. In Java there a convention-bordering-on-requirement that
a source file's location in the source tree be determined by the package it
belongs to. Java IDEs do this automatically. I haven't found any... more >>
Inheritance & Constructors
Posted by yuriy_zubarev at 4/29/2005 11:42:43 AM
Greetings,
I have 2 classes:
abstract class Abstract
{
public Abstract()
{
}
public Abstract(string name): this()
{
}
}
class Impl: Abstract
{
public Impl(): base()
{
// Some important code
}
public Impl(string name): base(name)
{
}
}
Wh... more >>
Read Only Property in Interface
Posted by Deepak Mishra at 4/29/2005 11:08:07 AM
I decleared interface with read only property
interface IPersonName
{
string Name { get; }
}
and in implementation of this interface, i implemented as read/write property
classs Student : IPersonName
{
string _name;
public sting Name
{
get { return _name; }
set ( _name = valu... more >>
ScriptTimeout and executionTimeout do not work
Posted by Arsen V. at 4/29/2005 10:18:18 AM
I am trying to make the page execute timeout after 2 seconds.
I first tried using the Server.ScriptTimeout = 2 in the Page_Load() event.
The next line does System.Threading.Thread.Sleep(10000); // 10 second pause
I was expecting the page to timeout with a Request timeout error. However,
it d... more >>
Terminating application during class initialization
Posted by Wysiwyg at 4/29/2005 10:16:23 AM
I'm new to C# and figuring out how to program a third-party addon for an
application. I don't have a form class per-se but I initialize a class that
uses the existing application's user interface libraries to draw a form;
it's loaded from XML in this case.
My question is: how do I terminate th... more >>
Inherit & implement Question in C#
Posted by hitendra15 NO[at]SPAM gmail.com at 4/29/2005 10:15:42 AM
Hi
i have 2 Interface IA,IB and base class BC and derived class CD please
that is
class CD : BC //Inherit
but i also want to implement IA and IB
when i write
class CD : BC,IA,IB it give error
please can any one suggest........
Thanks in advance
Hitendra
... more >>
Linking options
Posted by Cameron at 4/29/2005 9:31:13 AM
Is it possible to do a static link when building an executable? I have a
little application that uses 3 or 4 of my custom DLLs. I would like to
distribute the executable but to have to distribute it and these 3 or 4
other files is a pain. I would prefer if the executable was bigger and
conta... more >>
windows form datagrid questions
Posted by Wayne at 4/29/2005 9:13:29 AM
I have a datagrid on my windows form, it needs to be read only and when a
user selects a row, I want the whole row to be selected.
How would I go about doing this?
--
Thanks
Wayne Sepega
Jacksonville, Fl
Enterprise Library Configuration Console Module Generator
http://workspaces.gotdo... more >>
user controls
Posted by Phil Townsend at 4/29/2005 9:06:07 AM
Is there any way to tell the filename of a webform from a user control
that is calling it? In other words, if I place a user control into a
webform, can I, in the code behind, tell what .aspx page has called the
user control? Thx!
*** Sent via Developersdex http://www.developersdex.com ***... more >>
Don't want to use cached web pages
Posted by eieed at 4/29/2005 8:54:11 AM
I have a web app that displays a list of files in a folder on the server.
However, if I add or remove files from folder and reload the webpage, the
list of files remains the same. The only way I can get the correct file list
is for the user to Refresh on the client side. This won't work. Is ... more >>
Run with Administrator Credentials
Posted by JM at 4/29/2005 7:54:08 AM
Hi
Is there a way to invoke an external program in C# with Administrator
credentials? You know run an external VBS or batch?
Any reference material would be useful.
TIA... more >>
C# and Bar Codes
Posted by Robert at 4/29/2005 7:44:09 AM
Has anyone had experience with using bar codes with C#. I have a client who
wants to read a bar code with a patient's number on it and then look up the
patient in a database. I know they will need a scanner and decoder but what
will I need from a C# programmers perspective to read in the res... more >>
Problems importing C# DLL into VB6.0 project (urgent)
Posted by em at 4/29/2005 7:10:04 AM
Hi all,
I'm getting some problems importing a DLL that I made in C# within VB6.0.
The C# is quite easy, just for trying:
namespace TestDll
{
public class Class1
{
public int SumNumbers(int numn1, int num2)
{
int sum = num1 + num2;
return sum;
... more >>
|