You won’t be able to improve significantly performance while using .Net built in serializers. They are inheritably slow. I bumped into this many times. If performance is an issue I would recommend considering implementing custom destabilization (another word for “read you file and parse data in you code”).
Well, what I basically recommend using StreamWriter, StreamReader class to write to file /read from the file data stored in your objects. The approach requires specifying format of the file and how pieces of the data stored / retrieved from the file.
When applied to your example is might look something like this
public class CTempClass
public int m_uCrc64;
public int M_uCrc64
m_uCrc64 = value;
m_uCrc64 = 0;
static void Main(string args)
List<CTempClass> lsTemp = new List<CTempClass>();
for (int i = 0; i < 1000000; i++)
CTempClass oTemp = new CTempClass();
oTemp.m_uCrc64 = i;
oTemp = null;
Stopwatch s = new Stopwatch();
using (Stream stream = File.Open("c:\\data.bin", FileMode.Create))
BinaryWriter writer = new BinaryWriter(stream);
foreach (CTempClass instance in lsTemp)
I want to build an application for writing text in textbox using speech recognition. i.e. if i speak "This is my first application" it should be displayed on textbox.
I have tried but failed. Here is my code.
privatevoid Form3_Load(object sender, EventArgs e)
recognizer = new System.Speech.Recognition.SpeechRecognitionEngine();
GrammarBuilder dictaphoneGB = new GrammarBuilder();
GrammarBuilder dictation = new GrammarBuilder();
dictaphoneGB.Append(new SemanticResultKey("StartDictation", new SemanticResultValue("Start Dictation", true)));
dictaphoneGB.Append(new SemanticResultKey("DictationInput", dictation));
dictaphoneGB.Append(new SemanticResultKey("EndDictation", new SemanticResultValue("Stop Dictation", false)));
GrammarBuilder spelling = new GrammarBuilder();
GrammarBuilder spellingGB = new GrammarBuilder();
spellingGB.Append(new SemanticResultKey("StartSpelling", new SemanticResultValue("Start Spelling", true)));
spellingGB.Append(new SemanticResultKey("spellingInput", spelling));
spellingGB.Append(new SemanticResultKey("StopSpelling", new SemanticResultValue("Stop Spelling", true)));
GrammarBuilder both = GrammarBuilder.Add(dictaphoneGB, spellingGB);
Grammar grammar = new Grammar(both);
grammar.Enabled = true;
grammar.Name = "Dictaphone and Spelling ";
recognizer.SpeechRecognized += OnSpeechRecognized;
privatevoid OnSpeechRecognized(object sender, System.Speech.Recognition.SpeechRecognizedEventArgs e)
textBox1.Text = e.Result.Text;
There is no output.
Please help me i am new to speech recognition.
Thanks in advance.
Thank you for reply.
And i am sorry for my late reply.
I am not getting any response from the application, if i speak into Mic there is no response, it does not go into the speech_recognized() event.
So i really don't understand what is going wrong.
Please help me.
Thanks in advance.
Ever heard of "google"? It's that new-fangled search engine that's been available on the web for more than ten years...
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
Hello every one !
I'm a beginer in this forum and I'm researching about network computer.
I need a source code of a program as multichat to researching fastly.I tried to search source code VC# about this but can't.
I hope receive many helping !
Thanks all !