|
Right.
What was I thinking again?
so only solution is to put a Name inside the object, and forget reference names altogether.
|
|
|
|
|
But then, what's the name of the Name?
|
|
|
|
|
.NET 4.0 is rumored to provide introspection for that very purpose.
|
|
|
|
|
That's cool, but I can't wait that long. For now what I'm going to do is something like:
DumpObject(theObject, "theObject");
Thanks,
Jeff
|
|
|
|
|
OK.
FYI: There used to be a little preprocessor trick to automate that in C and C++ (using some ## magic),
but that is not available in C#...
|
|
|
|
|
Hi, do you want to acess a object from a form in otherform?
|
|
|
|
|
I have wrote a few projects in c# now, but in my latest I have come across a problem I can not seem to figure out. I have a float input from my user, lets say its something like
float t = 29;
I need c# to recognize and treat this float as 29.0 and be able to display it as such.
How do you control precision in c#? Thanks for the help!
-Auberon
|
|
|
|
|
Hi,
there is nothing wrong with float t=29; , but you could also write
float t=29.0f; to make it more explicit.
When outputting, use ToString() with a format specification argument if you prefer to be in charge
of the details.
|
|
|
|
|
Thanks a lot! Its always the small differences between c# and java that seem to trip me up. Such is the learning process. I appreciate it!
|
|
|
|
|
You're welcome.
How is this different from Java?
|
|
|
|
|
to display float in string form use yourFloatVariable.ToString("nx") where x is your precision
dhaim
program is hobby that make some money as side effect
|
|
|
|
|
Ah thanks a lot, its those little ones that get me. Thanks!
|
|
|
|
|
Is there a way to create pure C# remote processes and capture StdOut ?
I am able to do this by calling PsExec.exe (from sysinternals) from Process class and capturing Stdout.
I need an elegant way, Can Process class also create remote processes?
Can System.ManagementObject call capture StdOut apart from creating remote processes?
Thanks in anticipation
HK
Before c# there was darkness
|
|
|
|
|
Hi,
the Process and ProcessStartInfo classes hold what you need.
MSDN contains a simple example, where stdout (not stderr) is captured, and becomes available
only when the EXE terminates. Using extra threads and some Stream methods can overcome these
two limitations when necessary.
|
|
|
|
|
Oh I still could not find that link..could you please forward the remote process article.
Thnaks!
HK
Before c# there was darkness
|
|
|
|
|
Well i was happily coding away when i launched the debug process and ms started throwing exceptions. (and it was working fine about 5 secs before)
Application.StartupPath is throwing a SecurityException
Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Why now?
|
|
|
|
|
Make sure your project doesn't have partial trust security settings enabled.
In Visual Studio, you can go to your project properties and click on the Security tab to discover this information.
|
|
|
|
|
Judah Himango wrote: In Visual Studio, you can go to your project properties and click on the Security tab to discover this information.
Diabolical! putting security properties on the Security tab!
led mike
|
|
|
|
|
Hello all,
I really hope someone can assist me because I am totally lost here.
I have a program that users will access through a mass generated email (about 4000 users). They are filling out a form on a website and then I need to allow them to submit a digital signature with the form. I have read about RSA and DES Encryption but still a little foggy on how I can use it.
Does each person need to have a key generated when the email is sent out?
How do I mach up the key with the user when they go to the website in order to encrypt the signature correctly?
Can I just do the encryption and store it in the database and leave there? The only time I would need to unencrypt it is if someone is disputing a digital signature or if the user disputes the signature.
Can it be used over and over by the user? So if they need to go back to the site their digital signature can still be encrypted using the same key as previously.
As you can see I have a lot of questions about this. And I sure hope someone can help me?
~Candi
|
|
|
|
|
stormcandi wrote: I have read about RSA and DES Encryption but still a little foggy on how I can use it.
Have you read this?[^]
led mike
|
|
|
|
|
led mike wrote: Have you read this?[^]
led mike
led mike,
I did look at that and it explains the concept of digital signatures, but I cannot translate that to the how. I mean how do the users get their key in order to encrypt the signature? Plus all the other questions in my original post.
~Candi
|
|
|
|
|
Here's a tip for you, voting down my post is not the way to motivate me to help you.
led mike
|
|
|
|
|
I apologize. I did not realize that's what I did.
~Candi
|
|
|
|
|
stormcandi wrote: I apologize. I did not realize that's what I did.
Oh, ok no problem.
stormcandi wrote: I mean how do the users get their key in order to encrypt the signature?
Well that is possibly the largest problem in your scenario. If you issue them the key then it wouldn't be private would it. Making or even obtaining your own private key isn't difficult but it is not something that the average non technical person is going to do/want to do/be capable of doing ( PGP didn't take off and it's fall down simple ). So yeah, I don't know, it sounds like you might be between a rock and a hard place.
Have you considered alternative solutions? I mean you asked us how to do this particular solution for whatever problem you are trying to solve, you did not explain the problem. In most cases there is more than one way to solve a problem. Perhaps there is a way that would not require users having private keys.
led mike
|
|
|
|
|
led mike wrote: Have you considered alternative solutions? I mean you asked us how to do this particular solution for whatever problem you are trying to solve, you did not explain the problem. In most cases there is more than one way to solve a problem. Perhaps there is a way that would not require users having private keys.
I am not sure of alternative solutions. The articles I have read have all pretty much agreed that the RSA and DES encryption are how digital signatures are done. I am able to generate a key on a button click event, so I wonder if I couldn't do that when the user submits the form and do this symmetrically so user/admin have the same key. Then store it in a table to query if the data needs to be unencrypted at a later time. But then again the user could be anyone and not the one it was intended for.
What if I generated the key and then passed it through the URL query string in order to verify that it is the user submitting the form? And then store the key in the database to match key and user.
I am thinking outloud here, but maybe the second option would be the better one? I really don't know since I am new to this part of programming. I have done MD5 encrypting so I understand the concept of the encryption. But can't use MD5 because it is one-way encryption.
What do you think?
~Candi
|
|
|
|