Click here to Skip to main content
15,798,823 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: how it works Pin
jschell17-Feb-22 11:44
jschell17-Feb-22 11:44 
AnswerRe: how it works Pin
Richard MacCutchan17-Feb-22 22:35
mveRichard MacCutchan17-Feb-22 22:35 
GeneralRe: how it works Pin
Calin Negru18-Feb-22 3:17
Calin Negru18-Feb-22 3:17 
QuestionPlease help with dynamic objects modeling Blazor/MVC Pin
Guillermo Perez28-Jan-22 14:53
Guillermo Perez28-Jan-22 14:53 
AnswerRe: Please help with dynamic objects modeling Blazor/MVC Pin
Richard MacCutchan30-Jan-22 7:17
mveRichard MacCutchan30-Jan-22 7:17 
AnswerRe: Please help with dynamic objects modeling Blazor/MVC Pin
Richard Deeming30-Jan-22 22:48
mveRichard Deeming30-Jan-22 22:48 
GeneralRe: Please help with dynamic objects modeling Blazor/MVC Pin
Guillermo Perez31-Jan-22 12:01
Guillermo Perez31-Jan-22 12:01 
Question<pre>I Have an application that shows output of cpu utilization its memory used and current date and time in console application output now i want to store this 3 things in my database how can i store it?</pre> Pin
Member 154919019-Jan-22 23:06
Member 154919019-Jan-22 23:06 
using System.Diagnostics;


namespace cpu_performance
{
    internal class Class1
    {


        static void Main(string[] args)
        {

            PerformanceCounter cpuCounter;
            PerformanceCounter ramCounter;


            cpuCounter = new PerformanceCounter
            {
                CategoryName = "Processor",
                CounterName = "% Processor Time",
                InstanceName = "_Total"
            };
            cpuCounter = new PerformanceCounter("Processor", "% Processor Time", "_Total");
            ramCounter = new PerformanceCounter("Memory", "Available MBytes");

            Console.WriteLine("Computer CPU Utilization rate:" + cpuCounter.NextValue() + "%");
            Console.WriteLine("The computer can use memory:" + ramCounter.NextValue() + "MB");

            Console.WriteLine();

            while (true)
            {
                System.Threading.Thread.Sleep(1000);
                DateTime localDate = DateTime.Now;
                Console.WriteLine("Computer CPU Utilization rate:" + cpuCounter.NextValue() + " %");
                Console.WriteLine("The computer can use memory:" + ramCounter.NextValue() + "MB");
                Console.WriteLine("Local date and time: {0}, {1:G}", localDate.ToString(), localDate.Kind);
                Console.WriteLine();

                if ((int)cpuCounter.NextValue() > 80)
                {
                    System.Threading.Thread.Sleep(100 * 60);
                }


            }

        }


    }
}

AnswerRe: <pre>I Have an application that shows output of cpu utilization its memory used and current date and time in console application output now i want to store this 3 things in my database how can i store it?</pre> Pin
dan!sh 9-Jan-22 23:42
professional dan!sh 9-Jan-22 23:42 
AnswerRe: <pre>I Have an application that shows output of cpu utilization its memory used and current date and time in console application output now i want to store this 3 things in my database how can i store it?</pre> Pin
jschell17-Feb-22 11:46
jschell17-Feb-22 11:46 
QuestionIncorporating values directly (as is/bytewise) into a string Pin
primem0ver28-Dec-21 11:19
primem0ver28-Dec-21 11:19 
AnswerRe: Incorporating values directly (as is/bytewise) into a string Pin
primem0ver28-Dec-21 21:07
primem0ver28-Dec-21 21:07 
AnswerRe: Incorporating values directly (as is/bytewise) into a string Pin
trønderen29-Dec-21 2:21
trønderen29-Dec-21 2:21 
GeneralRe: Incorporating values directly (as is/bytewise) into a string Pin
Richard MacCutchan29-Dec-21 2:40
mveRichard MacCutchan29-Dec-21 2:40 
GeneralRe: Incorporating values directly (as is/bytewise) into a string Pin
trønderen29-Dec-21 10:28
trønderen29-Dec-21 10:28 
GeneralRe: Incorporating values directly (as is/bytewise) into a string Pin
jsc4231-Jan-22 1:23
professionaljsc4231-Jan-22 1:23 
GeneralRe: Incorporating values directly (as is/bytewise) into a string Pin
primem0ver29-Dec-21 21:36
primem0ver29-Dec-21 21:36 
GeneralRe: Incorporating values directly (as is/bytewise) into a string Pin
jschell30-Dec-21 9:11
jschell30-Dec-21 9:11 
GeneralRe: Incorporating values directly (as is/bytewise) into a string Pin
jschell30-Dec-21 8:58
jschell30-Dec-21 8:58 
AnswerRe: Incorporating values directly (as is/bytewise) into a string Pin
Gerry Schmitz30-Dec-21 5:50
mveGerry Schmitz30-Dec-21 5:50 
GeneralRe: Incorporating values directly (as is/bytewise) into a string Pin
jschell17-Feb-22 11:48
jschell17-Feb-22 11:48 
AnswerRe: Incorporating values directly (as is/bytewise) into a string Pin
jschell17-Feb-22 12:06
jschell17-Feb-22 12:06 
Questionhow to operate plc from dot net command Pin
Sanket Gaikwad 202128-Dec-21 2:36
Sanket Gaikwad 202128-Dec-21 2:36 
AnswerRe: how to operate plc from dot net command Pin
Richard MacCutchan28-Dec-21 3:04
mveRichard MacCutchan28-Dec-21 3:04 
AnswerRe: how to operate plc from dot net command Pin
Gerry Schmitz28-Dec-21 5:10
mveGerry Schmitz28-Dec-21 5:10 

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.