Created
February 9, 2024 12:16
-
-
Save bjoerntx/e9a987274d5c6769da3ee254edadc166 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// create a new SubTextPart with the name "part1" and id 1 | |
TXTextControl.SubTextPart subTextPart = new TXTextControl.SubTextPart("part1", 1); | |
// create a new UserInfo object | |
UserInfo userInfo = new UserInfo() | |
{ | |
Name = "John Doe", | |
Address = "123 Main Street", | |
City = "Dallas", | |
State = "TX", | |
Zip = "75201", | |
Phone = "214-555-1212" | |
}; | |
// serialize the UserInfo object to a JSON string | |
subTextPart.Data = JsonSerializer.Serialize(userInfo); | |
// add the subtext part to the SubTextParts collection | |
textControl1.SubTextParts.Add(subTextPart); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment