Click here to Skip to main content
15,912,578 members
Home / Discussions / C#
   

C#

 
AnswerRe: LINQ and Multithreading : insert not work Pin
Luc Pattyn25-Jan-11 10:24
sitebuilderLuc Pattyn25-Jan-11 10:24 
GeneralRe: LINQ and Multithreading : insert not work Pin
NoName_ark25-Jan-11 11:09
NoName_ark25-Jan-11 11:09 
AnswerRe: LINQ and Multithreading : insert not work Pin
Luc Pattyn25-Jan-11 11:22
sitebuilderLuc Pattyn25-Jan-11 11:22 
GeneralRe: LINQ and Multithreading : insert not work Pin
NoName_ark25-Jan-11 11:48
NoName_ark25-Jan-11 11:48 
AnswerRe: LINQ and Multithreading : insert not work Pin
NoName_ark25-Jan-11 12:28
NoName_ark25-Jan-11 12:28 
GeneralRe: LINQ and Multithreading : insert not work Pin
Pete O'Hanlon26-Jan-11 1:09
mvePete O'Hanlon26-Jan-11 1:09 
QuestionNeed help in c# simulation Pin
james aaron fanlo25-Jan-11 7:53
james aaron fanlo25-Jan-11 7:53 
AnswerRe: Need help in c# simulation Pin
Eddy Vluggen25-Jan-11 8:07
professionalEddy Vluggen25-Jan-11 8:07 
GeneralRe: Need help in c# simulation Pin
james aaron fanlo25-Jan-11 15:40
james aaron fanlo25-Jan-11 15:40 
GeneralRe: Need help in c# simulation Pin
Richard MacCutchan25-Jan-11 20:58
mveRichard MacCutchan25-Jan-11 20:58 
GeneralRe: Need help in c# simulation Pin
Eddy Vluggen26-Jan-11 0:21
professionalEddy Vluggen26-Jan-11 0:21 
QuestionGridView, Trying to get some columns editable, and some columns readonly. Pin
wizardzz25-Jan-11 7:39
wizardzz25-Jan-11 7:39 
AnswerRe: GridView, Trying to get some columns editable, and some columns readonly. Pin
Eddy Vluggen25-Jan-11 8:02
professionalEddy Vluggen25-Jan-11 8:02 
GeneralRe: GridView, Trying to get some columns editable, and some columns readonly. Pin
wizardzz25-Jan-11 8:07
wizardzz25-Jan-11 8:07 
GeneralRe: GridView, Trying to get some columns editable, and some columns readonly. Pin
Eddy Vluggen25-Jan-11 8:10
professionalEddy Vluggen25-Jan-11 8:10 
GeneralRe: GridView, Trying to get some columns editable, and some columns readonly. Pin
wizardzz25-Jan-11 11:52
wizardzz25-Jan-11 11:52 
GeneralRe: GridView, Trying to get some columns editable, and some columns readonly. Pin
Eddy Vluggen26-Jan-11 0:24
professionalEddy Vluggen26-Jan-11 0:24 
AnswerRe: GridView, Trying to get some columns editable, and some columns readonly. Pin
dasblinkenlight25-Jan-11 8:11
dasblinkenlight25-Jan-11 8:11 
QuestionPlease tell me why this simple shutdown application isn't working Pin
turbosupramk325-Jan-11 3:57
turbosupramk325-Jan-11 3:57 
It writes to the log file every 2 seconds, so I know it is looping, but it does not stop the shutdown executable from running. However if I loop it with a batch file it works perfect? Is there a way to have the command text write to the console window as well?

Thanks for reading.


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Threading;
using System.IO;


namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            while (true)
            {
                System.Diagnostics.ProcessStartInfo shutDownBlocker = new ProcessStartInfo();
                shutDownBlocker.FileName = @"c:\windows\system32\shutdown.exe";
                shutDownBlocker.WindowStyle = ProcessWindowStyle.Normal;
                shutDownBlocker.Arguments = " /a";
                shutDownBlocker.CreateNoWindow = false;
                Thread.Sleep(2000);
                File.AppendAllText(@"c:\temp\shutdownlog.txt", "ran command" + System.Environment.NewLine);
            }
        }
    }
}

AnswerRe: Please tell me why this simple shutdown application isn't working Pin
Praveen Raghuvanshi25-Jan-11 4:07
professionalPraveen Raghuvanshi25-Jan-11 4:07 
GeneralRe: Please tell me why this simple shutdown application isn't working Pin
turbosupramk325-Jan-11 4:53
turbosupramk325-Jan-11 4:53 
AnswerRe: Please tell me why this simple shutdown application isn't working Pin
Mirko198025-Jan-11 4:12
Mirko198025-Jan-11 4:12 
AnswerRe: Please tell me why this simple shutdown application isn't working Pin
Dave Kreskowiak25-Jan-11 4:17
mveDave Kreskowiak25-Jan-11 4:17 
GeneralRe: Please tell me why this simple shutdown application isn't working Pin
Mirko198025-Jan-11 4:25
Mirko198025-Jan-11 4:25 
GeneralRe: Please tell me why this simple shutdown application isn't working Pin
turbosupramk325-Jan-11 4:55
turbosupramk325-Jan-11 4:55 

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.