Click here to Skip to main content
15,897,371 members
Home / Discussions / C#
   

C#

 
Question.NET 2.0 Windows Service Deployment error on Windows 2008 server. Pin
Member 357347622-Dec-08 4:22
Member 357347622-Dec-08 4:22 
QuestionWriting to an Access DB locks DB Pin
Planker22-Dec-08 3:49
Planker22-Dec-08 3:49 
AnswerRe: Writing to an Access DB locks DB Pin
Dave Kreskowiak22-Dec-08 4:39
mveDave Kreskowiak22-Dec-08 4:39 
GeneralRe: Writing to an Access DB locks DB Pin
Planker22-Dec-08 5:01
Planker22-Dec-08 5:01 
AnswerRe: Writing to an Access DB locks DB Pin
Wendelius22-Dec-08 8:22
mentorWendelius22-Dec-08 8:22 
GeneralRe: Writing to an Access DB locks DB Pin
Dave Kreskowiak22-Dec-08 8:44
mveDave Kreskowiak22-Dec-08 8:44 
GeneralRe: Writing to an Access DB locks DB Pin
Wendelius22-Dec-08 9:31
mentorWendelius22-Dec-08 9:31 
QuestionHow to make Efficient algorithm Pin
wasimsharp22-Dec-08 3:44
wasimsharp22-Dec-08 3:44 
Hi i write a piece of code that is used to get the event log of the Window. and then i get the log Entries
EventLog[] logs = EventLog.GetEventLogs();

      //go through all the entries in all the logs
      foreach (EventLog log in logs)
      {

          foreach (EventLogEntry entry in log.Entries)
          {
              //we are only interested in bad events
              if ((entry.EntryType == EventLogEntryType.Error)
                  || (entry.EntryType == EventLogEntryType.Warning)
                  || (entry.EntryType == EventLogEntryType.FailureAudit))
              {
                  //check that the entry is newer than the last update timestamp
                  if (lastUpdate.CompareTo(entry.TimeGenerated) < 0)
                      x.addEvent(entry);
              }
          }

      }



Know when i execute this code on server
it take 60% to 70 % of the CPU . Please give me any idea to make it more efficent so that it take 10 to 20% of CPU

WANTED wasim khan(Killed 50 Innocent Buggs, Distroyed 200 Exception, make 5 Project Hostage) any Compnay Hire him will pay 30,000. Best place where u can get him is Sorcim Technologies Murre Road RWP

AnswerRe: How to make Efficient algorithm Pin
Pete O'Hanlon22-Dec-08 4:36
mvePete O'Hanlon22-Dec-08 4:36 
GeneralRe: How to make Efficient algorithm Pin
wasimsharp22-Dec-08 20:40
wasimsharp22-Dec-08 20:40 
AnswerRe: How to make Efficient algorithm Pin
Mark Churchill22-Dec-08 19:17
Mark Churchill22-Dec-08 19:17 
GeneralRe: How to make Efficient algorithm Pin
wasimsharp22-Dec-08 20:35
wasimsharp22-Dec-08 20:35 
Questionauto hide Pin
erdem0122-Dec-08 3:27
erdem0122-Dec-08 3:27 
AnswerRe: auto hide Pin
#realJSOP22-Dec-08 3:28
professional#realJSOP22-Dec-08 3:28 
QuestionRichTextBox.Find method fails to find known string. Pin
Mark F.22-Dec-08 3:21
Mark F.22-Dec-08 3:21 
AnswerRe: RichTextBox.Find method fails to find known string. Pin
Lev Danielyan22-Dec-08 3:26
Lev Danielyan22-Dec-08 3:26 
AnswerRe: RichTextBox.Find method fails to find known string. Pin
#realJSOP22-Dec-08 3:27
professional#realJSOP22-Dec-08 3:27 
GeneralRe: RichTextBox.Find method fails to find known string. &lt;&lt;&lt; Fixed! Pin
Mark F.22-Dec-08 4:00
Mark F.22-Dec-08 4:00 
AnswerRe: RichTextBox.Find method fails to find known string. Pin
Pete O'Hanlon22-Dec-08 3:32
mvePete O'Hanlon22-Dec-08 3:32 
Questionhow to close MessageBox automatically Pin
Sajjad Izadi22-Dec-08 3:12
Sajjad Izadi22-Dec-08 3:12 
AnswerRe: how to close MessageBox automatically Pin
Tom Deketelaere22-Dec-08 3:19
professionalTom Deketelaere22-Dec-08 3:19 
GeneralRe: how to close MessageBox automatically Pin
Sajjad Izadi22-Dec-08 3:31
Sajjad Izadi22-Dec-08 3:31 
GeneralRe: how to close MessageBox automatically Pin
N a v a n e e t h22-Dec-08 3:35
N a v a n e e t h22-Dec-08 3:35 
GeneralRe: how to close MessageBox automatically Pin
Tom Deketelaere22-Dec-08 3:41
professionalTom Deketelaere22-Dec-08 3:41 
AnswerRe: how to close MessageBox automatically Pin
Ravi Bhavnani22-Dec-08 3:40
professionalRavi Bhavnani22-Dec-08 3:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.