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

.NET (Core and Framework)

 
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 22:06
MemberMember 154919019-Jan-22 22:06 
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 22:42
professional dan!sh 9-Jan-22 22: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 10:46
Memberjschell17-Feb-22 10:46 
QuestionIncorporating values directly (as is/bytewise) into a string Pin
primem0ver28-Dec-21 10:19
Memberprimem0ver28-Dec-21 10:19 
AnswerRe: Incorporating values directly (as is/bytewise) into a string Pin
primem0ver28-Dec-21 20:07
Memberprimem0ver28-Dec-21 20:07 
AnswerRe: Incorporating values directly (as is/bytewise) into a string Pin
trønderen29-Dec-21 1:21
Membertrønderen29-Dec-21 1:21 
GeneralRe: Incorporating values directly (as is/bytewise) into a string Pin
Richard MacCutchan29-Dec-21 1:40
mveRichard MacCutchan29-Dec-21 1:40 
GeneralRe: Incorporating values directly (as is/bytewise) into a string Pin
trønderen29-Dec-21 9:28
Membertrønderen29-Dec-21 9:28 
The common property between unions and common blocks is that they both provide to different users a common blob, telling: Here is a binary blob - interpret it any way you want!

Details in accessability are different; in C you may have somewhat better control over which modules have access to the union definition. And you have collected all the different interpretations of that binary blob in one place (at least until you start casting pointer types).

Yet, the basic concept is the same: A binary blob that can be interpreted in any way that the accessor would like to. Sure, it must be one of the alternatives in the union definition. Just like an interpretation of a Fortran COMMON block must be according to one of the alternative source code definitions that COMMON block in the modules that may access it.

You may argue that collecting the COMMON block definitions / union alternatives in a single place is an improvement. Yes, it is, but the basic idea of a binary blob providing multiple interpretations is the same.

You may argue that while any Fortran module might access that binary COMMON blob, only those C modules including the definition of the union, and knowing the address of (if you like: a pointer to) a union instance, this doesn't give any sort of protection against the uncontrolled interpretation of the binary blob.

Even Fortran COMMON block had some accessability control: You had not only the plain, anonymous COMMON blocks but also named COMMON blocks - sort of comparable to letting only selected modules #include the union type definition: If you didn't know the name of the blob, you didn't have access to it. Sure, it was a poor kind of protection, but lots of protection is based on the (lack of) knowledge of how to access it. C/C++ provides a somewhat better protection.

In this case, considering how easily any C pointer can be cast into a pointer of any other type - and note: the definition of the target type is arbitrary; it doesn't have to be any centrally managed type definition - the type control of C/C++ lies much closer to the weak Fortran type check than to that of C#.
GeneralRe: Incorporating values directly (as is/bytewise) into a string Pin
jsc4231-Jan-22 0:23
professionaljsc4231-Jan-22 0:23 
GeneralRe: Incorporating values directly (as is/bytewise) into a string Pin
primem0ver29-Dec-21 20:36
Memberprimem0ver29-Dec-21 20:36 
GeneralRe: Incorporating values directly (as is/bytewise) into a string Pin
jschell30-Dec-21 8:11
Memberjschell30-Dec-21 8:11 
GeneralRe: Incorporating values directly (as is/bytewise) into a string Pin
jschell30-Dec-21 7:58
Memberjschell30-Dec-21 7:58 
AnswerRe: Incorporating values directly (as is/bytewise) into a string Pin
Gerry Schmitz30-Dec-21 4:50
mveGerry Schmitz30-Dec-21 4:50 
GeneralRe: Incorporating values directly (as is/bytewise) into a string Pin
jschell17-Feb-22 10:48
Memberjschell17-Feb-22 10:48 
AnswerRe: Incorporating values directly (as is/bytewise) into a string Pin
jschell17-Feb-22 11:06
Memberjschell17-Feb-22 11:06 
Questionhow to operate plc from dot net command Pin
Sanket Gaikwad 202128-Dec-21 1:36
MemberSanket Gaikwad 202128-Dec-21 1:36 
AnswerRe: how to operate plc from dot net command Pin
Richard MacCutchan28-Dec-21 2:04
mveRichard MacCutchan28-Dec-21 2:04 
AnswerRe: how to operate plc from dot net command Pin
Gerry Schmitz28-Dec-21 4:10
mveGerry Schmitz28-Dec-21 4:10 
QuestionText Editor color setting Pin
Oscar K.26-Dec-21 20:21
MemberOscar K.26-Dec-21 20:21 
AnswerRe: Text Editor color setting Pin
Gerry Schmitz27-Dec-21 5:19
mveGerry Schmitz27-Dec-21 5:19 
GeneralRe: Text Editor color setting Pin
Oscar K.29-Dec-21 1:07
MemberOscar K.29-Dec-21 1:07 
AnswerRe: Text Editor color setting Pin
trønderen29-Dec-21 1:51
Membertrønderen29-Dec-21 1:51 
PraiseRe: Text Editor color setting Pin
Oscar K.29-Dec-21 23:21
MemberOscar K.29-Dec-21 23:21 
QuestionAny learning materials specifically on porting WPF to MAUI? Pin
greatoceansoftware26-Nov-21 6:02
Membergreatoceansoftware26-Nov-21 6:02 
AnswerRe: Any learning materials specifically on porting WPF to MAUI? Pin
Gerry Schmitz26-Nov-21 8:08
mveGerry Schmitz26-Nov-21 8:08 

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.