Click here to Skip to main content
15,894,539 members
Home / Discussions / C#
   

C#

 
QuestionGet serial number from local printers connected to workstation by USB Pin
SzakiII15-Jun-21 2:28
SzakiII15-Jun-21 2:28 
AnswerRe: Get serial number from local printers connected to workstation by USB Pin
Gerry Schmitz15-Jun-21 9:21
mveGerry Schmitz15-Jun-21 9:21 
AnswerRe: Get serial number from local printers connected to workstation by USB Pin
Randor 15-Jun-21 11:41
professional Randor 15-Jun-21 11:41 
GeneralRe: Get serial number from local printers connected to workstation by USB Pin
Gerry Schmitz15-Jun-21 13:13
mveGerry Schmitz15-Jun-21 13:13 
GeneralRe: Get serial number from local printers connected to workstation by USB Pin
Randor 15-Jun-21 14:06
professional Randor 15-Jun-21 14:06 
Questionhow to convert Character codes HTML to arabic using c# Pin
michael nabil14-Jun-21 8:30
michael nabil14-Jun-21 8:30 
AnswerRe: how to convert Character codes HTML to arabic using c# Pin
Richard Deeming14-Jun-21 22:02
mveRichard Deeming14-Jun-21 22:02 
GeneralRe: how to convert Character codes HTML to arabic using c# Pin
michael nabil15-Jun-21 3:00
michael nabil15-Jun-21 3:00 
GeneralRe: how to convert Character codes HTML to arabic using c# Pin
Richard Deeming15-Jun-21 3:26
mveRichard Deeming15-Jun-21 3:26 
AnswerRe: how to convert Character codes HTML to arabic using c# Pin
Gerry Schmitz15-Jun-21 6:14
mveGerry Schmitz15-Jun-21 6:14 
QuestionHow to add row headers to DataGridView? Pin
Alex Dunlop9-Jun-21 19:16
Alex Dunlop9-Jun-21 19:16 
AnswerRe: How to add row headers to DataGridView? Pin
OriginalGriff9-Jun-21 20:13
mveOriginalGriff9-Jun-21 20:13 
GeneralRe: How to add row headers to DataGridView? Pin
Alex Dunlop9-Jun-21 21:53
Alex Dunlop9-Jun-21 21:53 
GeneralRe: How to add row headers to DataGridView? Pin
OriginalGriff9-Jun-21 22:07
mveOriginalGriff9-Jun-21 22:07 
GeneralRe: How to add row headers to DataGridView? Pin
Alex Dunlop9-Jun-21 22:10
Alex Dunlop9-Jun-21 22:10 
GeneralRe: How to add row headers to DataGridView? Pin
OriginalGriff9-Jun-21 22:25
mveOriginalGriff9-Jun-21 22:25 
GeneralRe: How to add row headers to DataGridView? Pin
Alex Dunlop9-Jun-21 22:39
Alex Dunlop9-Jun-21 22:39 
GeneralRe: How to add row headers to DataGridView? Pin
OriginalGriff9-Jun-21 22:41
mveOriginalGriff9-Jun-21 22:41 
GeneralRe: How to add row headers to DataGridView? Pin
Alex Dunlop9-Jun-21 23:08
Alex Dunlop9-Jun-21 23:08 
GeneralRe: How to add row headers to DataGridView? Pin
Alex Dunlop10-Jun-21 0:02
Alex Dunlop10-Jun-21 0:02 
GeneralRe: How to add row headers to DataGridView? Pin
OriginalGriff10-Jun-21 0:24
mveOriginalGriff10-Jun-21 0:24 
QuestionHow can i read a xml file with Linq? c# Pin
bart10008-Jun-21 9:07
bart10008-Jun-21 9:07 
i'll try to read a cwe xml file. The problem is i have not good solution read it in a good way out

That is a xml file
CWE - Downloads[]


I'll find for example ID "1004" and will read all Items behind.
When i will read value from <background_detail> i find not a way to read this out

XElement xelement = XElement.Load(@".\cwec_v4.4.xml");

var value = from cwe in xelement.Elements().Elements()
                where (string)cwe.Attribute("ID") == "1004"
                select cwe;

foreach (XElement xEle in value)
{
    Console.WriteLine(xEle.Value);
}


var result = xelement.Elements().Elements()
             .Where(x => x.Attribute("ID").Value == "1004")
             .Elements().Where(x => x.Name == "Background_Details")
             .Elements().Where(x => x.Name == "Background_Detail")
             .Select(x => x.Value);


Have somebody experience and can help me

modified 8-Jun-21 16:20pm.

AnswerRe: How can i read a xml file with Linq? c# Pin
Gerry Schmitz8-Jun-21 19:43
mveGerry Schmitz8-Jun-21 19:43 
AnswerRe: How can i read a xml file with Linq? c# Pin
Richard Deeming8-Jun-21 21:29
mveRichard Deeming8-Jun-21 21:29 
PraiseRe: How can i read a xml file with Linq? c# Pin
bart10009-Jun-21 4:12
bart10009-Jun-21 4:12 

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.