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

.NET (Core and Framework)

 
QuestionPlease help with dynamic objects modeling Blazor/MVC Pin
Guillermo Perez28-Jan-22 13:53
MemberGuillermo Perez28-Jan-22 13:53 
AnswerRe: Please help with dynamic objects modeling Blazor/MVC Pin
Richard MacCutchan30-Jan-22 6:17
mveRichard MacCutchan30-Jan-22 6:17 
AnswerRe: Please help with dynamic objects modeling Blazor/MVC Pin
Richard Deeming30-Jan-22 21:48
mveRichard Deeming30-Jan-22 21:48 
GeneralRe: Please help with dynamic objects modeling Blazor/MVC Pin
Guillermo Perez31-Jan-22 11:01
MemberGuillermo Perez31-Jan-22 11: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 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 
I know this may seem arbitrary to some, but the nature of the project that I am currently working on makes this capability an easy way to solve several problems.

I want an efficient, seamless way to integrate values into a stream of characters. I have done this in the past by just converting byte values into chars or even using value.tostring() but it would be more efficient if the characters could be read directly from the memory containing the values. (Examples: an integer is read as 2 characters, a long is read as 4 characters and a GUID is read as 8 characters). This would be really simple in C++. In c# it is turning out to be a huge challenge.

I tried using a generic with using StructLayout.Explicit but I got a runtime error stating that this is not supported. Using non-generics doesn't work either because strings and arrays are classes while values are structs and mixing them also doesn't work for the simple reason that the non zero terminated strings used in .NET track data that is probably inconsistent with this layout.

Is there any way to directly read (or even copy) data from numeric value bytes into a string? I can think of one possibility using unsafe copying but was wondering if I had any other better (more efficient) options.
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 
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 

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.