Click here to Skip to main content
15,924,193 members
Home / Discussions / C#
   

C#

 
AnswerRe: delegates Pin
Pete O'Hanlon21-Sep-07 0:02
mvePete O'Hanlon21-Sep-07 0:02 
QuestionEnterPrise Library 3.0 April 2007 Pin
Praveen02920-Sep-07 21:55
Praveen02920-Sep-07 21:55 
Questiondata binding for listbox to display table Pin
cyn820-Sep-07 21:44
cyn820-Sep-07 21:44 
QuestionReading xml Pin
praveenkumar palla20-Sep-07 20:53
praveenkumar palla20-Sep-07 20:53 
AnswerRe: Reading xml Pin
Scott Dorman20-Sep-07 20:55
professionalScott Dorman20-Sep-07 20:55 
GeneralRe: Reading xml Pin
praveenkumar palla21-Sep-07 3:50
praveenkumar palla21-Sep-07 3:50 
GeneralRe: Reading xml Pin
praveenkumar palla21-Sep-07 3:52
praveenkumar palla21-Sep-07 3:52 
GeneralRe: Reading xml Pin
Scott Dorman21-Sep-07 4:25
professionalScott Dorman21-Sep-07 4:25 
Yes, you can't do it this way. If GetNamedItem fails to find the attribute, it returns null, so the call to Value fails with the null reference exception.

Instead, you need to do it like this:
C#
XmlNode node = xmlchildnodelst[0].Attributes.GetNamedItem("pwd");
 
if (node != null)
{
   // attribute exists, so retrieve the value
   Password = node.Value;
}
else
{
   // attribute doesn't exist
}


Also, please put the code blocks, including the xml, inside <pre> tags, which will keep the formatting and make it much easier to read.


Scott.

—In just two days, tomorrow will be yesterday.

[Forum Guidelines] [Articles] [Blog]

QuestionReplace Word in file with other. File Handling. Pin
Bhavesh Bagadiya20-Sep-07 20:47
Bhavesh Bagadiya20-Sep-07 20:47 
AnswerRe: Replace Word in file with other. File Handling. Pin
JoeSharp20-Sep-07 21:11
JoeSharp20-Sep-07 21:11 
GeneralRe: Replace Word in file with other. File Handling. Pin
Bhavesh Bagadiya20-Sep-07 21:17
Bhavesh Bagadiya20-Sep-07 21:17 
GeneralRe: Replace Word in file with other. File Handling. Pin
Giorgi Dalakishvili20-Sep-07 21:19
mentorGiorgi Dalakishvili20-Sep-07 21:19 
QuestionC#,How to retrieve the image in sql to image control Pin
Ursrathi20-Sep-07 20:41
Ursrathi20-Sep-07 20:41 
AnswerRe: C#,How to retrieve the image in sql to image control Pin
Giorgi Dalakishvili20-Sep-07 20:51
mentorGiorgi Dalakishvili20-Sep-07 20:51 
QuestionPlease help me how to create a simple RadioButton Column in DataGridView. Pin
pcphuc20-Sep-07 20:28
pcphuc20-Sep-07 20:28 
AnswerRe: Please help me how to create a simple RadioButton Column in DataGridView. Pin
Sathesh Sakthivel20-Sep-07 21:14
Sathesh Sakthivel20-Sep-07 21:14 
GeneralRe: Please help me how to create a simple RadioButton Column in DataGridView. Pin
pcphuc20-Sep-07 21:19
pcphuc20-Sep-07 21:19 
GeneralRe: Please help me how to create a simple RadioButton Column in DataGridView. Pin
Dave Kreskowiak21-Sep-07 5:46
mveDave Kreskowiak21-Sep-07 5:46 
GeneralRe: Please help me how to create a simple RadioButton Column in DataGridView. Pin
rashidpervaiz0821-Sep-07 19:59
rashidpervaiz0821-Sep-07 19:59 
GeneralRe: Please help me how to create a simple RadioButton Column in DataGridView. Pin
pcphuc21-Sep-07 22:17
pcphuc21-Sep-07 22:17 
QuestionCalling Base Class From GrandChild class Pin
N a v a n e e t h20-Sep-07 19:36
N a v a n e e t h20-Sep-07 19:36 
AnswerRe: Calling Base Class From GrandChild class Pin
Christian Graus20-Sep-07 20:40
protectorChristian Graus20-Sep-07 20:40 
GeneralRe: Calling Base Class From GrandChild class Pin
N a v a n e e t h20-Sep-07 21:20
N a v a n e e t h20-Sep-07 21:20 
GeneralRe: Calling Base Class From GrandChild class Pin
Christian Graus20-Sep-07 21:54
protectorChristian Graus20-Sep-07 21:54 
GeneralRe: Calling Base Class From GrandChild class Pin
N a v a n e e t h20-Sep-07 22:33
N a v a n e e t h20-Sep-07 22:33 

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.