Click here to Skip to main content
15,349,321 members
Home / Discussions / C#
   

C#

 
Questionmultithreaded ping IPs Pin
alireza barzin30-Jun-16 20:16
Memberalireza barzin30-Jun-16 20:16 
AnswerRe: multithreaded ping IPs Pin
OriginalGriff30-Jun-16 21:17
mveOriginalGriff30-Jun-16 21:17 
QuestionHow to make REST requests with C# Pin
Member 1090638630-Jun-16 10:24
MemberMember 1090638630-Jun-16 10:24 
AnswerRe: How to make REST requests with C# Pin
ZurdoDev30-Jun-16 10:29
professionalZurdoDev30-Jun-16 10:29 
Questionnot save my the data Pin
antonio_dsanchez29-Jun-16 10:43
Memberantonio_dsanchez29-Jun-16 10:43 
AnswerRe: not save my the data Pin
Pete O'Hanlon29-Jun-16 11:28
mvaPete O'Hanlon29-Jun-16 11:28 
AnswerRe: not save my the data Pin
OriginalGriff29-Jun-16 19:02
mveOriginalGriff29-Jun-16 19:02 
QuestionTrouble With .Net XmlSerializer Pin
Jacob Himes28-Jun-16 22:24
professionalJacob Himes28-Jun-16 22:24 
I have a rather complicated class describing an xml structure, I've been using the .net XmlSerializer and its has worked for almost all of my purposes except for one very important kink.

I have an element deep in my xml object where the rules are no more. The element has text and xml elements mingled in with the text. Like so.

XML
<KnownElement>
Here is some text <c>This is important text</c> here is some more text <c>Yet more important text stuff</c> more text
</KnownElement>


I need to be able to know at the very least, where the text is and where the important text is (which can assume different tags by the way, so need to know which tags they assume too), in regards to each other.

This is as close as I've gotten to a solution.

C#
public class KnownElement
   {
       [XmlAnyElement]
       public XmlElement[] DocumentNodes { get; set; }

       [XmlText]
       public string[] Text { get; set; }
    }


This allows me to retrieve the nodes for the important text as well as the text that isn't in a node, but inside the KnownElement. The only problem is I have no idea in which order they're all are in the grand scheme. The DocumentNodes property returns an ordered enumeration of the nodes (important text) inside KnownElement, and the Text property returns an array of strings of which are an ordered occurrence of text separated by nodes.

This is neat, but say I have only one node, and one text... I have no idea if the text came before or after the node.

Is there anyway to get the desired effect without me throwing up a xmlreader or something like that...? I would hate to iterate through the HUGE structure this little bit is found within.
AnswerRe: Trouble With .Net XmlSerializer Pin
Gerry Schmitz29-Jun-16 5:13
mveGerry Schmitz29-Jun-16 5:13 
QuestionHow do you import and secure a file? Pin
SolJohnston77728-Jun-16 6:21
professionalSolJohnston77728-Jun-16 6:21 
AnswerRe: How do you import and secure a file? Pin
Eddy Vluggen28-Jun-16 7:02
professionalEddy Vluggen28-Jun-16 7:02 
AnswerRe: How do you import and secure a file? Pin
Dave Kreskowiak28-Jun-16 12:20
mveDave Kreskowiak28-Jun-16 12:20 
GeneralRe: How do you import and secure a file? Pin
SolJohnston77730-Jun-16 9:34
professionalSolJohnston77730-Jun-16 9:34 
PraiseWhy don't use C#6 code for ASP.Net MVC application? Pin
Hein Pauwelyn28-Jun-16 3:40
MemberHein Pauwelyn28-Jun-16 3:40 
AnswerRe: Why don't use C#6 code for ASP.Net MVC application? Pin
Dave Kreskowiak28-Jun-16 3:42
mveDave Kreskowiak28-Jun-16 3:42 
GeneralRe: Why don't use C#6 code for ASP.Net MVC application? Pin
Richard Deeming28-Jun-16 4:01
mveRichard Deeming28-Jun-16 4:01 
GeneralRe: Why don't use C#6 code for ASP.Net MVC application? Pin
BillWoodruff29-Jun-16 8:43
mveBillWoodruff29-Jun-16 8:43 
QuestionEWS Managed API : "The SMTP address has no mailbox associated with it." Pin
Kuthuparakkal28-Jun-16 2:16
MemberKuthuparakkal28-Jun-16 2:16 
AnswerRe: EWS Managed API : "The SMTP address has no mailbox associated with it." Pin
OriginalGriff28-Jun-16 2:25
mveOriginalGriff28-Jun-16 2:25 
QuestionFloating window implementation using c# Pin
srikrishnathanthri27-Jun-16 19:49
Membersrikrishnathanthri27-Jun-16 19:49 
QuestionNeed Help with Assignment board logic. Pin
Aspylacide27-Jun-16 15:38
MemberAspylacide27-Jun-16 15:38 
AnswerRe: Need Help with Assignment board logic. Pin
Gerry Schmitz27-Jun-16 19:52
mveGerry Schmitz27-Jun-16 19:52 
AnswerRe: Need Help with Assignment board logic. Pin
Nathan Minier28-Jun-16 1:49
professionalNathan Minier28-Jun-16 1:49 
AnswerRe: Need Help with Assignment board logic. Pin
BillWoodruff28-Jun-16 4:39
mveBillWoodruff28-Jun-16 4:39 
GeneralRe: Need Help with Assignment board logic. Pin
Aspylacide28-Jun-16 13:34
MemberAspylacide28-Jun-16 13:34 

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.