|
This is fine, although the
Claudiu Schiopu wrote: catch (Exception)
{
throw;
}
doesn't really do much. You can just have the
try and
finally blocks, and the code would effectively do the same thing.
The shout of progress is not "Eureka!" it's "Strange... that's not what i expected". - peterchen
|
|
|
|
|
How do i run powershell script from c# button
i want to run as example simple powershell command
for example : Get-WmiObject Win32_ComputerSystem | Select name, in textbox
|
|
|
|
|
You probably need to use the Process.Start() [^] method.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Hi Richard, Just thought you might like to know that there's an article on CP which does this in a better way than Process.Start - see my comment below for a link. When I last did it, the method described seemed to work better than Process.Start so might be worth knowing about if you ever need to do this.
|
|
|
|
|
Thanks, looks like a very useful link. I guess I should really have remembered
this as I have done a bit of reading about PowerShell in the past.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
|
right now i'm having a c# tcp server that collect the data from different sites and insert it in to database and a web application that show data. What i want is to bind them in to one single web application.if it is possible please give me some ideas.
|
|
|
|
|
1) Specify it.
2) Design it.
3) Code it.
4) Test it.
5) Depending on the results of (4), repeat from appropriate stage from (1) to (3) or release it.
If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.
|
|
|
|
|
Can I change the ReceivedBytesThreshold in a serial port ?
I have some packets that will be large, and some that will be small, and I want to be able to allocate more time when I'm doing the large ones
|
|
|
|
|
add some id in packet header and define the id according to the size of the packet like '0' for small packet '1' for large packet.First parse the header and then according to the id allocate time.
|
|
|
|
|
I'm not very good with regular expressions. Google isnt' turning up much, but I think it's because I am not asking correctly.
I have a data annotation with multiple things I'm looking for in the regular expression validation. I have two words that can be typed, or it can start with one letter, but it cannot end in a letter unless it's on of the two words.
I've been tinkering with just starting with 2 letters, or ending with 1 letter. I found that one alright:
@"^[a-zA-Z0-9]{1}[0-9]+\d"
but I need the opposite of that. If I were to use that for validation I need something that does not match that pattern. I thought ^() would reverse it, but it didn't.
Urgentz codez?
If it moves, compile it
|
|
|
|
|
Maybe try a (?! subexpression ) Zero-width negative lookahead assertion.
|
|
|
|
|
thanks for the help.
If it moves, compile it
|
|
|
|
|
@"(^([0-9]|[A-Za-z][0-9])[A-Za-z0-9]+\d$)|(SpecialWord)|(OtherSpecialWord)"
I always do that. I post a question and then realize I was being a tard. This is the/a solution for the data annotation.
If it moves, compile it
|
|
|
|
|
Hi,
Does anyone know the exact location of the C#.net ascii table or where exactly it is generated. Can someone please assist me a path or file name.
Thank You.
|
|
|
|
|
for(byte i=0;i<255;i++){
Console.WriteLine(((char)i));
}
|
|
|
|
|
Thanks, but I don't need the code. I need the location of where to find it. Sorry about the misunderstanding.
|
|
|
|
|
What are you talking about? A file that contains a list of ASCII values!?
/ravi
|
|
|
|
|
I really don't know how to make this any clearer. I am looking for the specific "location" of where the process of generating ascii values are done with the .net environment.
|
|
|
|
|
They're not generated. The .NET framework (and other frameworks such as the JDK) use Unicode encodings to map characters in different scripts to byte values. Unicode and ASCII reference tables are of course available online.
Hope this helps.
/ravi
|
|
|
|
|
Ok understood. But "where exactly" (location) are these mapping done in the environment. All I am asking for is a path or file name.
|
|
|
|
|
They are done in read-only sections of code and aren't configurable (i.e. read from a file or the registry). It's the same with timezone definitions, calendar types and locales.
/ravi
|
|
|
|
|
There's no "editor", there's no "file" where the mappings are loaded from.
|
|
|
|
|
I would suppose
System.Text.ASCIIEncoding
In mscorlib (in mscorlib.dll)
|
|
|
|
|
Jschell,
Thank you very much for the help. I am very curious how you went about finding this file. Can you please explain your methodology?
Thanks again.
|
|
|
|