all groups > c# > june 2005 > threads for thursday june 16
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
Invokemethod and static variables
Posted by julien at 6/16/2005 11:01:42 PM
Hello,
I have an assembly with a static variable:
private static readonly ILog log4net = LogManager.GetLogger(typeof(Core));
In one of the methods, I use this variable:
private void myMethod()
{
...
log4net.Debug("something to log");
...
}
In one of my NUnit test, I create an inst... more >>
Retrieving system information
Posted by kurotsuke at 6/16/2005 9:24:40 PM
How can I retrieve the amount of RAM installed on the system and if
the user has the Administrator privileges?
Thanks a lot.... more >>
In these cases, Is the build for all the modules is necessary?
Posted by isamusetu at 6/16/2005 9:11:04 PM
Hello, I have a question.
I have a big project, and all the modules are over 100, some of dll was
referenced by most of the modules (dll, exe)
When one EXE call a DLL, if some functions in the DLL was modified, for
example: fix some bugs, usually all the modules will be recompiled, but
becau... more >>
add space in string
Posted by NuCoder at 6/16/2005 7:56:42 PM
I'm getting a string like this
BMWLEXUSBMWMERCEDES
how can I add a space so it looks like this
BMW, LEXUS, BMW, MERCEDES
... more >>
About delegate and event.
Posted by Steven.Xu at 6/16/2005 6:18:03 PM
Hello, everyone.
As we know, some event definded like following:
public delegate MyEventDelegate(object pram);
public class ClassA
{
public event MyEventDelegate MyEvent;
}
My question is must I check the instance of "MyEvent" is exist before raise
the event. For example:
if (this.My... more >>
Infer SqlDbType Enumeration Member via Reflection
Posted by Brett Kelly at 6/16/2005 5:59:21 PM
Hello all,
I'm in a situation where I need to retrieve a member from the
System.Data.SqlDbType enumeration knowing only the type name.
At this point, I'm just trying to get reflection to work... This is
what I've got so far:
using System;
using System.Reflection;
using System.Data;
n... more >>
Overlapping timer notificatoins?
Posted by Adam at 6/16/2005 5:42:41 PM
If I have a long task to do in my timer event, how can I properlystop
my timer again being notified again while I am still processing?
Thanks.
Adam
... more >>
Using GCHandle with Enums
Posted by Hexar Anderson at 6/16/2005 5:30:06 PM
Why can't you pin an enumeration? For example, the with the following code:
public enum MyEnum : byte
{
ValueOne = 1,
ValueTwo = 2
}
public class MyClass
{
public MyFunc()
{
MyEnum m = MyEnum.ValueOne;
GCHandle myGch = GCHandle.Alloc(m, GCHandleType.Pinned);
}... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
MD5, SHA1 (can hash size be adjusted)
Posted by Jesper at 6/16/2005 4:19:06 PM
Hi,
Is it possible to adjust the hash size of the algorithm used. I would like
to get a hash size less than 160 bit.
Regards... more >>
program folder
Posted by Rick at 6/16/2005 4:18:35 PM
How do I retrieve the path of the folder where the program is installed.
If the program is installed in c:\program files\myapp and is called from
d:\temp, the Environment.CurrentDirectory returns d:\temp. What do I call
to get c:\program files\myapp?
Thanks,
RickN
... more >>
dead line for .net version 2 ?
Posted by albaity at 6/16/2005 3:51:12 PM
Loading Image Resources
Posted by J.Marsch at 6/16/2005 3:44:43 PM
Building a large app where we want to be able to ship updated icons like
patches/assign different "skins", etc.
So, I'm looking at storing sets of related icons in assemblies that will be
loaded dynamically.
Some questions:
What's the "best practices" way to load an assembly where its o... more >>
Dictionary<> not using IComparable<> to find keys?
Posted by ESPNSTI at 6/16/2005 12:27:15 PM
Hi,
I'm trying to use a generics dictionary with a key class that implements and
needs IComparable<>.
However when I attempt to use the dictionary, it doesn't appear to use the
IComparable<> to find the key.
In the example below, accessing the dictionary by using the exact key object
that wa... more >>
Whats up with Shell....?
Posted by Andrew at 6/16/2005 11:53:11 AM
Please be patient new to C#
Want to use the C# equivilent of VB "Shell" & "Send Keys"
ie:
x=Shell "Path\Notepad.exe"
AppActivate(x)
SendKeys "This is a New TextFile" & "{F3}S"
Tried the Tools.Shell but it says need a ;
If there are no equivilents in C# could someone let me know.
Than... more >>
Socket.Available and UDP datagrams
Posted by Claire at 6/16/2005 11:43:46 AM
I'm implementing a UDP server socket from the system.net.sockets.socket
class. (no, I don't want to use the udpclient class)
I'm polling the socket in a thread, testing the socket.available property on
each pass.
With datagrams, does socket.available only advertise when there are complete
pa... more >>
appending to rtf string problems
Posted by mikemac76 at 6/16/2005 11:35:08 AM
I am trying to build a test harness to practice appending strings to an rtf
string. I am doing this to simulate the string I'll be sending over the wire
and receiving on the other end of an IM application. Below is the code I use
to test.
I receive this error everytime I try to send the... more >>
Referencing variables on user control pages
Posted by James Glover at 6/16/2005 11:32:22 AM
I need to be able to reference a variable that is set in the code behind of
an aspx page in a user control embedded on the page.
An example:
The code behind sets a position number; say ,1 to 5. The included user
control is expecting that variable to know which element to highlight. (T... more >>
SizeOf for managed types
Posted by Salvador at 6/16/2005 11:07:10 AM
Hi,
Does anybody know how to get the size in bytes of a managed type?
I have a hashtable and I want to check the size in bytes. I can get the size
using sizeof for value types with prmitives types (like int32, etc).
Thanks
--
Salvador Alvarez Patuel
Exony Ltd - London, UK... more >>
Timers and Windows Service question
Posted by Nathan Kovac at 6/16/2005 10:51:44 AM
I have a feeling I am missing something simple, but I just can't find it.
Perhaps someone can give me a lead on where to look. I will describe the
issue then post my code to the web service. My issue is simply getting
timers to work. I have a DatabaseManager.DataManagerFacade which contains... more >>
Protected or Public ?
Posted by Paperback Writer at 6/16/2005 10:51:31 AM
I have 30 textBox in my UserControl...they are with PROTECTED modifier.
But i need to access these TextBox throught my WebForm...
What is the best way to access them ? leaving PROTECTED and creating publics
properties or Leaving de objects publics ?
--
Please, check my theSpoke:
http://www... more >>
[Newbie Question] Populating Textbox.text from a dataview using column names?
Posted by DC at 6/16/2005 10:45:41 AM
Is it possible to populate a list of Textbox.Text items from a dataview
using column names?
IE:
tbNameTextBox.Text = dvDataView.Table.Column("Name").ToString();
tbAddressTextBox.Text = dvDataView.Table.Column("Address").ToString();
Or someting similar?
--
_____________________________... more >>
Parsing string dates into DateTime
Posted by Mark Rae at 6/16/2005 10:45:17 AM
Hi,
Say you are working with a CSV file generated by a legacy mainframe which
stores dates in the format 'ddMMMyy' e.g. ,16JUN05,
Extracting the individual date parts is easy enough, but is there a "neat"
way of converting the string 'JUN' into the integer 6. Obviously it would be
easy e... more >>
distributing a c# application
Posted by Hans [DiaGraphIT] at 6/16/2005 10:37:05 AM
Hi!
I thought that I've already posted this question(s), but let me try again.
I've developed a windows application for use in a medical environment. I
now need to distribute this application to a number of computers, how many i
don't know.
My application uses a third part supplier for... more >>
typeof
Posted by Peter Kirk at 6/16/2005 9:58:53 AM
Hi
is there a difference between "this.GetType()" and typeof(MyClass)?
The only reason I ask is that we are using log4net in a project, and we give
the Loggers names based on the class name.
For example, some people use:
ILog log = LogManager.GetLogger(typeof(Finder).ToString());
other... more >>
array count function
Posted by mechweb at 6/16/2005 9:40:36 AM
Does ms have any functions that can count the elements in an array, or do I
just need to write a for loop?
... more >>
storing array in session variable
Posted by mechweb at 6/16/2005 9:39:33 AM
Hi all, I can successfully store an array in a session variable like so:
string[] arr1 = new string[10];
Session["myarray"] = arr1;
But, when I try to display the elements (using the code below) on another
page I get this error:
txtmyarray.Text = Session["myarray"][0];
Cannot apply in... more >>
How to remove "charset=UTF-8" from Content-Type
Posted by Simon_E at 6/16/2005 8:47:09 AM
We are experiencing problems with calling a Web Service that runs on Oracle
HTTP Server powered by Apache.
The Web Service returns 400 Bad Request.
The explanation I got from the developer of the Web Service is that Apache
doesn't accept messages that contains the information "charset=utf-8... more >>
Passing C-style array of ints to the method in .NET dll
Posted by muntyanu NO[at]SPAM hotmail.com at 6/16/2005 8:25:22 AM
Hi all,
I am trying to pass array of ints to the method in .NET dll.
This is fragment of my code
// C++ side
int test[2] = new int[2] {1,2};
NETClass::DoSomething(test,2);
// .NET side
public NETClass
{
public static void DoSomething([MarshalAs(UnmanagedType.LPArray,
SizeParamIndex=1)] i... more >>
msi configuration
Posted by Hans [DiaGraphIT] at 6/16/2005 8:06:01 AM
Hi!
I'm not sure this is the right discussion group for my problem, but this
group is the one I'm using mostly.
My application is using Crystal Decisions for handling reports etc.
I need several dll files installed on each computer running my application.
for this I've created a setup f... more >>
How to use MethodInfo ?
Posted by JPSutor at 6/16/2005 5:57:21 AM
Does anyone know what MethodInfo is for and how to use it?
... more >>
problem in httphandler (server.execute)-please urgent..
Posted by sathya at 6/16/2005 3:02:23 AM
hi,
i have problem in httphandler, my problem is that when i am trying to
use server.execute(/default.aspx) i am getting error....
[Error executing child request for /Default.aspx]
Here i am trying to redirect from home.aspx to default.aspx (both file
isin sharepoint).I have give a co... more >>
Disabling multiple instances of a MDIChild form.
Posted by VM at 6/16/2005 12:00:00 AM
Hi,
Is it possible to open always only one instance of a MDIChild form?
Say, if form A is already opened, just give it the focus.
I tried declaring theMDIChild forms as private members of the MDI form
(using the MDI menu's script), but when the MDIChild form is closed (x
button pushed), I c... more >>
Byte building
Posted by Gianmaria I. at 6/16/2005 12:00:00 AM
Hi,
having a BitArray, how can i extract bits to create a System.byte
as in the example...
With
BitArray bits
and
Byte myNewByte
bits[0] to bits[7] => myNewByte
... more >>
How to convert this VB code to C#?
Posted by Jason Huang at 6/16/2005 12:00:00 AM
Hi,
I would like to convert the following Visual Basic code to C#, does someone
has free tool to convert it?
Function PreConnect() As Boolean
Dim strDSN$, strUidPwd$, strDatabase$, strConnect$
Dim hFile As Integer, strBuffer As String
' open and read
hFile = F... more >>
blob from database
Posted by Hrvoje Voda at 6/16/2005 12:00:00 AM
How to read a blob from database into an array byte ?
Hrcko
... more >>
Relation between Tread Vs RAM Vs CPU
Posted by Marty at 6/16/2005 12:00:00 AM
Hi,
I have two questions,
First, does anybody know how to quantify the relation between the number
of threads, the amount of RAM and the CPU power?
Secondly, does a System.Threading.Timer is lighter in used ressources
than using a thread ? why? Does it start/stop faster than a thread ?... more >>
C#(2005) DLL using in VSC++(2005) - Needs copy constructor???
Posted by Mas L via DotNetMonster.com at 6/16/2005 12:00:00 AM
Hi,
I have a C-sharp DLL(C#2005) and I use it as a reference in a VSC++(2005)
project.
When I
Myclass Obj = gcnew Myclass();
he says that I need a copy constructor!!??!!! Is there a way to avoid this?
Kind Regards
NETFAN
--
Message posted via DotNetMonster.com
http://www.dot... more >>
Array of sbyte to string conversion
Posted by acerblue at 6/16/2005 12:00:00 AM
Hi,
I've an array of sbyte with null char termination. I'd like to convert it to
string type. How can I do that ?
Thanks
ssggys
... more >>
CSTA in C#
Posted by Yarns at 6/16/2005 12:00:00 AM
Hi,
maybe somebody try use CSTA in C#... i need some sample... etc.
Greetings
... more >>
Windows service. Showing a dialog box
Posted by Claire at 6/16/2005 12:00:00 AM
I've written a Windows Service application that monitors input through a com
port.
It's been requested that I add a dialog box so that, should anyone need to
watch the input for troubleshooting reasons, they can.
I remember that I had to call a version of the MessageBox() function that
uses ... more >>
|