|
I guess not. It seems you have to use a combination of MSIL and the MethodInfo object. This should allow you up and down the stack but what a mess?
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
How can I do that?
Mybe the only way is to send the values with the exeption
Moreno
|
|
|
|
|
You can offset to the stack just like you would when doing inline asm in C++, however, considering the nature of .NET it seems like code that could break really easily.
If you are doing a web method I know a way to log those dynamically with attributes through soap extensions but for normal methods I am out of ideas.
Sending the error values with an exception is a good idea. In fact, your exception should be specifically typed to your needs and not take an empty constructor anyway. Also, if your method takes more than a few (3?) arguments consider creating an object for parameters for the specific method.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
hi friends!
im converting a report to pdf and sending it as a mail attachment now what i need to do is password protect this pdf attachment...have anyone any ideas /suggestions???
pls help!
|
|
|
|
|
oh i need to do this programmatically through c#(if that was not obvious before ) thanks !
|
|
|
|
|
Hello,
Sorry for my bad English... I want to decode a eMail's sujet because it's the windows-1252 or iso-8859-1 encoding...
How to do that ?
thank you.
Mick@
|
|
|
|
|
Have you looked at the System.Net.Mail.MailMessage class?
|
|
|
|
|
Yes... And no methode exist for decoding...
Mick@
|
|
|
|
|
Maybe this [^]will help you
There are 10 kinds of people: those who understand binary and those who don't
|
|
|
|
|
thank you... But I try and its no work... there is my code :
Encoding encodeWidows1252 = Encoding.GetEncoding(1252);
Encoding encodeUTF8= Encoding.UTF8;
Byte[] tabByte = encodeUTF8.GetBytes(texte);
return Encoding.GetEncoding(1252).GetString(tabByte);
Mick@
|
|
|
|
|
Nobody can tell me what the problem ?
Mick@
|
|
|
|
|
Hi,
Sometimes when I perform a system task in my application, like copying a file, writing to the registry etc., it takes some time for that task to complete. And for that period my application seems to hang.
I can solve this problem by running this task in a separate thread.
But what i really want to show to the user is that how the task is progressing (via a ProgressBar).
How do I accomplish this?
regards,
Ratish Philip.
|
|
|
|
|
Use BackGroundWorker component. It can report progress during the operation
|
|
|
|
|
Hey,
I looked up BackgroundWorker component in the Web. It is an excellent class. But everywhere, in the example, they run a loop in the DoWork method and within the loop they call the ReportProgress method which in turn updates the progress bar.
What if the DoWork method contains a single line line instead of a loop (as in the case of copying a file or writing a value to the registry). Then how & when do we call the ReportProgress method?
|
|
|
|
|
|
Thanks a ton.
Ratish Philip
|
|
|
|
|
plz anyone know about displaying data in excel files using c# on command prompt thats using console application plz help me
|
|
|
|
|
ramyanaidu wrote: plz anyone know about displaying data in excel files using c# on command prompt thats using console application
You want to write data to an excel file, or read from it?
There are 10 kinds of people: those who understand binary and those who don't
|
|
|
|
|
|
Dear all,
I want some help regarding to higlight the text in the grid which when we provided in a textbox the text should be highlighted wherever the text exists in the grids data
Waiting for a reply
Thanks in advance.
sai krishna
|
|
|
|
|
I'm not sure if there is a direct way to do this....
To highlight the text navigate to each cell of the gridview and compare the cell content with the 'Search' text and if they match try to set the background color for that particular cell...
Koushik
|
|
|
|
|
But this cannot be done in easier manner so any one can help me
many thanks
sai krishna
|
|
|
|
|
dsaikrishna wrote: But this cannot be done in easier manner
Everything has to be easy?
There are 10 kinds of people: those who understand binary and those who don't
|
|
|
|
|
Hey its easy man...try to figure out your way...
Koushik
|
|
|
|
|
Hi,
I am wanting to know what I would need to do to retrieve a list of the referenced assemblies names and versions at runtime and add them to list etc.
Thanks, Andrew.
|
|
|
|