It doesn't look like something like this is possible in 2.0:
public <T> doStuff();
Am I correct, and if so, there's probably a good reason that I can't
think of why not......
more >>
how to finde out in C# that a prossess "exe" is allready running or not ?
Posted by Saleh Matani at 11/30/2005 5:17:48 PM
how to finde out in C# that a prossess "exe" is allready running or not ?
and how to make programm wait 1 sec between checks?
thank you
Saleh Matani...
more >>
Simple question
Posted by Marty List at 11/30/2005 5:03:20 PM
I have a C++ background, I'm new to C#, and I'm trying to clean up someone
else's code:
if(purge)
for(int j = 1; j < 2; j++)
try{
dumpster.Remove(1);
}
catch(Exception e){
WriteEvent(ErrorSource, e.StackTrace, LogType.Error);
}
Question #1: The "fo...
more >>
socket programming and windows service
Posted by Ankit Aneja at 11/30/2005 4:09:52 PM
I am making windows service using Microsoft visual studio.Net in C#
service name is clamservice
problem is that when i start the service it through
control pannel->Administrative tools->services
it shows "starting" and never shows "started"
it goes somewhere in loop i am doing some logical mist...
more >>
SQLDataAdapter. ODBCDataAdapter etc. Habe they disappeared from .Net 2.0 Webforms
Posted by Rob Dob at 11/30/2005 4:01:10 PM
SQLDataAdapter. ODBCDataAdapter etc. Have they disappeared from .Net 2.0
Webforms?
can somone please elaborate as I cannot seem to find support for these..
...
more >>
how can get windows usercontrols from RunTime ganerater Form
Posted by Mian Mahboob at 11/30/2005 3:23:47 PM
Nicholas Paldino
in my application a have an Windows form on that i place an Panel Control.
in Form
load event i ganerate an Form in Panel Control on Runtime then get an design
time
create user-control (textbox, 2 buttons) in Runtime Form Runtime Form may
be contain
more then 1 same or ...
more >>
Anyone know how...
Posted by O-('' Q) at 11/30/2005 3:16:13 PM
....to translate the following to C#.NET style?
var
i: Integer;
begin
txtMyIP.Lines.Clear;
sHTML := HTTP.Get('http://www.network-tools.com/');
if sHTML = '' then
Exit;
sIpAddr := 'IP unavailable.';
i := Pos('host', sHTML);
if i = 0 then
Exit;
...
more >>
Databinding to business object
Posted by David Veeneman at 11/30/2005 2:56:14 PM
Hi-- I'm trying to databind a business object to several controls using the
DataBindings property of the controls, like this:
textBoxStartDate.DataBindings.Add("Text", CurrentStep,
"StartDate",
true, DataSourceUpdateMode.OnValidation, String.Empty,
"d");
...
more >>
Comparing numbers and determing the biggest.
Posted by esparkman at 11/30/2005 2:49:05 PM
Hey guys! 1st time poster here. Got a quick question. I'm just
beginning my journey into csharp and am developing a win32 app that
will retrieve a given useres account pull raw data from a db and
display that info. One of the things i need t odo is look at 7 entries
and compare those and then de...
more >>
BindingSource...?
Posted by Daniel R. Rossnagel at 11/30/2005 2:19:27 PM
To determine from assembly whatever bindingsource has the form that uses
this assembly and to obtain a listing of such
...
more >>
what do i need to compile for compact framework / mobile devices?
Posted by Digital Fart at 11/30/2005 1:25:01 PM
what ms product do i need to buy to compile programs for
the compact framework and mobile devices?
looking at there vs products i only see the architect version. Very
expensive as we only need to compile a sourcecode that we bought from
a vendor. We only need to adjust some small pieces of co...
more >>
Abstraction Issue
Posted by Cody at 11/30/2005 1:08:59 PM
We have a situation where our adapter (Assembly A) gets data from a
database and gives the data to an internal service (Assembly B) which
then gives it to the client (Assembly C). By the time it reaches
Assembly C, the source information of where the data came from is lost.
In other words, Ass...
more >>
newby C# web app cookie question
Posted by Fred Nelson at 11/30/2005 12:57:21 PM
Hi:
I'm developing a web application that needs to have five values, each
retrieved from cookies on many pages.
If I have five "Request.Cookies" commands together does this cause five
"round trips" to the browser or am I accessing one instance.
If five round trips occur then I will devel...
more >>
Office Web Component Events
Posted by gbradford3 NO[at]SPAM excite.com at 11/30/2005 12:44:49 PM
I am creating a C# windowsform app and I wish to use the OWC10 com
component.
I have followed the below instructions to enable events on the
component:
"HOW TO: Handle Events for the Office Web Components in Visual
Studio .NET" -
http://support.microsoft.com/default.aspx?scid=kb;en-us;328...
more >>
urgent help needed with exception handling.
Posted by Jack jensen at 11/30/2005 10:44:46 AM
Hello,
I have the code below :(simplified zip code format)
try
{
Convert.ToInt32(tbOShipPostalCode.Text);
}
catch
{
MessageBox.Show("The zip code must be a number.", "Zip code
error",
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
...
more >>
Logging messages in a class based on who is using it...?
Posted by JohnW at 11/30/2005 10:35:55 AM
Hi,
I'm not sure of the terminology here but...
I have a standalone assembly (Foo) and I log errors using a simple call
in my "catch" blocks: e.g.
class Foo
....
public DoSomething()
{
....
catch
{
LogError("blah", Severity.Error, etc....);
}
....
void LogError(msg,sev,...) { outpu...
more >>
UTF8 Question
Posted by Nuno Magalhaes at 11/30/2005 10:27:53 AM
Why does (in the code below) the message should appear as "keep-alive -
keep-alive - test" but it only appears as "keep-alive - keep-alive".
That is why the last comparation (Equals) isn't getting true. Is it
from the "Convert.ToByte('\0')" that does the comparation false?
I'm shure that the str...
more >>
Clearing Session Variables
Posted by Amy at 11/30/2005 10:23:51 AM
I'm having a problem with clearing my session variables. I'm using
session variables to pass data from a web form to a pdf generator.
The problem comes in when a user goes back to the original page and
takes data out of the field - the session variable is persisting.
i tried the following, an...
more >>
BackgroundImage: Slow Redraw for runtime loaded bitmaps
Posted by jgraham at 11/30/2005 9:56:01 AM
I have an application which configures the user interface (UI) at
runtime, meaning, the images that make up the UI are loaded based on
the current configuration when the application starts. The UI is
populated with normal controls (buttons, lists, etc.) but some controls
can load a bitmap to re...
more >>
Serious Threading.Monitor issues in .NET 2.0
Posted by Michael Kennedy at 11/30/2005 9:43:43 AM
Hi,
I have been looking into the claim that the keyword lock is not safe
when exceptions are possible. That lead me to try the following code,
which I think has uncovered a serious error in the .NET 2.0 framework.
Note that this runs better, but not perfectly, on .NET 1.1.
Note: The numbers...
more >>
Marshalled structure size
Posted by Laurent at 11/30/2005 9:38:37 AM
Hello,
This is probably a dumb question, but I just would like to understand
how the C# compiler computes the size of the managed structure or classes.
I'm working on this class:
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi)]
public class MyClass
{
pub...
more >>
communicating with remote server via http
Posted by Greg at 11/30/2005 9:33:47 AM
I've been tasked with writing a small app to that needs to talk to a
remote server via raw http.
Data is to be sent and received using name-value pairs. I have been
given the syntax for various http requests.
My app doesn't know much about the server app (on a customer's
computer). Where do I...
more >>
Why does Guid.GetHashcode() returns 0 when instantiated with Guid.Empty ?
Posted by csharper at 11/30/2005 9:08:57 AM
Why does Guid.GetHashcode() returns 0 when instantiated with Guid.Empty
?
...
more >>
making an http server
Posted by lucifer at 11/30/2005 8:53:29 AM
hi
i am making an http server
it has following functions
main()
{
if option is "-?", output the hints and stop
check the directory supplied is sensible and not a security risk
become a daemon process
ignore child programs (to avoid zombies when child processes stop)
create a socket, bind ...
more >>
IResettable - a suggestion for the next version of WinForms
Posted by Andrew Ducker at 11/30/2005 8:36:26 AM
Almost every project I work on, I end up with some variant of an
IResettable interface - so that controls can be reset to a default
value. Controls have a ResetText method, but that's not much use for
checkboxes, and you can't set a default for things to be reset back to,
on a control by contro...
more >>
can we do fork() in c#
Posted by lucifer at 11/30/2005 8:02:45 AM
hi
i have code that i have to implement in c#
Code:
/* Become deamon + unstopable and no zombies children
(= no wait()) */
if(fork() != 0)
return 0; /* parent returns OK to shell */
(void)signal(SIGCLD, SIG_IGN); /* ignore child death */
...
more >>
hunting down a memory leak
Posted by jason at 11/30/2005 7:55:20 AM
my w3wp.exe process has recently gotten an ever-expanding memory
footprint. the two most likely causes are either a memory leak in the
object library it uses, or session variables not getting cleaned up
correctly. this post is to check one thing in the object library, to
make sure that the "usin...
more >>
Preventing files being added to a directory
Posted by Greg at 11/30/2005 7:10:08 AM
Is there an easy way to design a service that "listens" for attempts to
add files to a specified directory, and on detecting an attempt
starting another exe? I've no idea how feasible it is without getting
too deep into the WinAPI.
...
more >>
HttpWebResponse how does it end
Posted by Nuno Magalhaes at 11/30/2005 6:51:34 AM
In pages that there is no content length, how does HttpWebResponse
knows where the page ends? And what kind of objects/methods does it
retrieve? Does it only retrieve the initial page without any images,
i.e., does it only makes one "GET / HTTP/1.1\r\n\r\n"?
Because I'm doing some projects on ...
more >>
How to prevent UserControl property Auto code generate
Posted by Sharon at 11/30/2005 5:36:27 AM
I'm writing my own control that derived from the UserControl.
In my control I have some public properties (with get and set) that I do not
want them to be shown on the designer properties window and I also do not
want the Windows Form Designer to generate code automatically on the user
Form f...
more >>
how can i get a list of all the exchange servers in a domain?
Posted by akis at 11/30/2005 4:49:05 AM
TROUBLE DEPLOYING SIMPLE C# APP TO WINDOWS 2000 Machine
Posted by Richard Mintz at 11/30/2005 3:59:06 AM
Hi,
I am trying to deploy a C# application to a Windows 2000 machine. When I try
to run the app after the install i get a runtime error. the setup works on
both
XP and windows 2003 server machines.
Any Ideas
Thanks for your help
...
more >>
Does MethodImpl Synchronized atribute is like lock(this) ?
Posted by yaron at 11/30/2005 3:50:02 AM
Hi,
Does MethodImpl Synchronized attribute is like lock(this) ?
i mean that a call to Monitor.PulseAll(this) from a Synchronized method will
trigger other thread that call to Monitor.Wait(this) ?
Thanks.
...
more >>
retain checked state of checkbox
Posted by voodoman NO[at]SPAM gmail.com at 11/30/2005 3:19:24 AM
hi there
can't work out for the life of me at the mo why the code below doesn't
do what I want. the last matching PK it finds sets the checkbox and
this is the only 1 that displays. any ideas please.
int contractCounter = 0;
foreach(Timesheets.Contract oContract in allContracts)
{
...
more >>
question related to sqldataadapter.
Posted by archana at 11/30/2005 3:17:04 AM
hi all
I have some doubts related to database handling in .net.
I am using sqldataadapter to update and insert rows into database.
What i want to know is at a time of inserting rows using
sqlqueryanalyser, is their any locking system used internally.
if yes what it is.
any help will ...
more >>
configurationmanager
Posted by Myo Zaw at 11/30/2005 12:00:00 AM
hi,
can i use configurationmanager in .net 2.0 windows form. cause i have
an app.config file and i couldn't extract the data from there by using
configurationmanager nor 1.1 feature. do u have any suggestion about that.
thanks,
myo zaw
...
more >>
How to generate code in Form_Load method. NOT in InitializeComponent()
Posted by JacksonYin at 11/30/2005 12:00:00 AM
In VS2005, there is a so personal change about Binding Data.
IDE will gernerate the code about Adapter.Fill(DataSet) automatically. =
such=20
as:
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private ...
more >>