Click here to Skip to main content
15,886,873 members
Home / Discussions / C#
   

C#

 
AnswerRe: Monospaced font (i.e. "Terminal" font in FontDialog Pin
trønderen15-Jun-23 4:15
trønderen15-Jun-23 4:15 
AnswerRe: Monospaced font (i.e. "Terminal" font in FontDialog Pin
Dave Kreskowiak15-Jun-23 7:38
mveDave Kreskowiak15-Jun-23 7:38 
GeneralRe: Monospaced font (i.e. "Terminal" font in FontDialog Pin
Richard Andrew x6415-Jun-23 14:56
professionalRichard Andrew x6415-Jun-23 14:56 
GeneralRe: Monospaced font (i.e. "Terminal" font in FontDialog Pin
jschell16-Jun-23 9:58
jschell16-Jun-23 9:58 
GeneralRe: Monospaced font (i.e. "Terminal" font in FontDialog Pin
trønderen19-Jun-23 8:48
trønderen19-Jun-23 8:48 
QuestionReferencing an Array from another Class Pin
Member 1602947114-Jun-23 5:44
Member 1602947114-Jun-23 5:44 
AnswerRe: Referencing an Array from another Class Pin
OriginalGriff14-Jun-23 6:00
mveOriginalGriff14-Jun-23 6:00 
AnswerRe: Referencing an Array from another Class Pin
jschell14-Jun-23 6:11
jschell14-Jun-23 6:11 
Other answer is probably better but if you need to use an existing structure...

You can create it dynamically (pseudo code)

int count = ....;
var sections = new Sectionquery[count];
for (int i=0; i < count; i++)
{
  sections[i].id = ...
  sections[i].name = ...
}
newPost.sectionQueries = sections ;


You can also create it statically using the same layout you have already used. Although typically that would not be useful for the the structure you gave. But it wouldn't be used for PostSections either.

Pseudo code (google for 'c# create array statically')

var newPost = new PostSections()
{
  ...     
  sectionQueries = new Sectionquery[] 
   { 
     new {
           "1", // id
           "xxx", // name
           ...
         },
     new {
           "2", // id
           "yyy", // name
           ...
         },
   }
};

QuestionHow to use switch case instead of if statements? Pin
Member 1405587912-Jun-23 0:28
Member 1405587912-Jun-23 0:28 
AnswerRe: How to use switch case instead of if statements? Pin
Richard Deeming12-Jun-23 1:06
mveRichard Deeming12-Jun-23 1:06 
AnswerRe: How to use switch case instead of if statements? Pin
jschell12-Jun-23 11:09
jschell12-Jun-23 11:09 
QuestionClean code in C# development Pin
WeiminYu10-Jun-23 18:27
WeiminYu10-Jun-23 18:27 
AnswerRe: Clean code in C# development Pin
OriginalGriff10-Jun-23 18:31
mveOriginalGriff10-Jun-23 18:31 
GeneralRe: Clean code in C# development Pin
Richard Andrew x6411-Jun-23 7:17
professionalRichard Andrew x6411-Jun-23 7:17 
GeneralRe: Clean code in C# development Pin
OriginalGriff11-Jun-23 8:32
mveOriginalGriff11-Jun-23 8:32 
GeneralRe: Clean code in C# development Pin
trønderen11-Jun-23 11:20
trønderen11-Jun-23 11:20 
QuestionGetting Google Contacts Pin
Kevin Marois6-Jun-23 16:46
professionalKevin Marois6-Jun-23 16:46 
AnswerRe: Getting Google Contacts Pin
OriginalGriff6-Jun-23 18:47
mveOriginalGriff6-Jun-23 18:47 
GeneralRe: Getting Google Contacts Pin
Kevin Marois7-Jun-23 5:51
professionalKevin Marois7-Jun-23 5:51 
AnswerRe: Getting Google Contacts Pin
Richard MacCutchan6-Jun-23 22:02
mveRichard MacCutchan6-Jun-23 22:02 
GeneralRe: Getting Google Contacts Pin
jschell7-Jun-23 5:19
jschell7-Jun-23 5:19 
GeneralRe: Getting Google Contacts Pin
Richard MacCutchan7-Jun-23 5:42
mveRichard MacCutchan7-Jun-23 5:42 
GeneralRe: Getting Google Contacts Pin
Kevin Marois7-Jun-23 5:53
professionalKevin Marois7-Jun-23 5:53 
GeneralRe: Getting Google Contacts Pin
Richard MacCutchan7-Jun-23 6:09
mveRichard MacCutchan7-Jun-23 6:09 
GeneralRe: Getting Google Contacts Pin
Kevin Marois7-Jun-23 7:00
professionalKevin Marois7-Jun-23 7:00 

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.