// -Original post by SpacixOne
// -Updated Exception handler from Greeeg's suggestion.
// -Changed to more appropriate namespace
static void Main(string args)
throw new NotImplementedException("CodeProject is not a free homework service.");
“It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.”
how many times a word is used in a sentence,or its frequency
“this is a dog and that is a pig”
You answered your own question.
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
1. Write a function that goes through your sentence and isolates individual words.
2. For each word, check if it's in a hash table that maps strings to integers (counts). If it is, increment that word's integer and save it in the hash table's entry for that word. If it isn't, insert the word into the hash table with a one count.
3. Go through the hash table and print out each word and the integer associated with it.
i am developing application which accesses all my lan machines and output their individual into the text files, but which method is good using Elog class or using wmi.or tell me is there any way to specify username and password in Elog class
Does anyone know if I can call code created in VB 6 from C# 2008?
Yes, you can.
Daniel Fowler wrote:
If so, what areas (or keywords) do I need to look up to reaserch this on?
VB6 dlls use COM. It's called COM interop.
Pretty much all you do is VS is add a reference, go to the COM tab, locate the library you want to use. VS will create an interop assembly. (You can look in this assembly to see the details of how the COM stuff is called, if you fancied doing it manually)