Click here to Skip to main content
15,908,768 members
Home / Discussions / C#
   

C#

 
QuestionCall C# DLL from unmanaged C++: question on string Pin
Koushik Biswas2-Mar-06 10:05
Koushik Biswas2-Mar-06 10:05 
QuestionRegex and Replace Pin
eggsovereasy2-Mar-06 9:39
eggsovereasy2-Mar-06 9:39 
AnswerRe: Regex and Replace Pin
Guffa2-Mar-06 9:44
Guffa2-Mar-06 9:44 
GeneralRe: Regex and Replace Pin
eggsovereasy2-Mar-06 9:50
eggsovereasy2-Mar-06 9:50 
GeneralRe: Regex and Replace Pin
Nadia Monalisa2-Mar-06 10:04
Nadia Monalisa2-Mar-06 10:04 
GeneralRe: Regex and Replace Pin
Paul Conrad2-Mar-06 18:51
professionalPaul Conrad2-Mar-06 18:51 
Questionextracting values of meta tags in html Pin
rizwan_rashid2-Mar-06 9:19
rizwan_rashid2-Mar-06 9:19 
QuestionDisplaying an xml file on the Command Prompt Pin
Rajareet2-Mar-06 9:01
Rajareet2-Mar-06 9:01 
Hi,
I have written code to dispay an xml file on the command prompt, but wierdly, I am getting system.setting[] as the output instead of the xml file..I have entered in parameters such as /xml and a path.

Here is my code..

Can anyone tell me what wrong and why I am getting a difference output ?

using System;
using System.Xml;

namespace EliteDMSUtilities
{
///
/// Summary description for Class1.
///

class EntryPoint
{
///
/// The main entry point for the application.
///

[STAThread]
static void Main(string[] args)
{
//string[] args = new string[10];
//args[0] = "/xml";
//args[1] ="C:\Test\Elite_Dms_SystemSetting.xml";

if( args.Length >0)
{
if(args.GetValue(0).ToString()== "/xml")
{
Execute_Cmd_xml(args);
}
else
{
Console.WriteLine("Unrecognized command");
Console.ReadLine();
}
}



}// end of main
static void Execute_Cmd_xml(string[] args)
{
Console.WriteLine(args.ToString());
string sIFolderName ="";
try
{
XmlDocument doc = new XmlDocument();
if (args.Length > 1)
{
for(int i=1; i < args.Length; i++)
sIFolderName = sIFolderName + " " + args.GetValue(i).ToString().ToLower();
sIFolderName = sIFolderName.TrimStart();
Console.WriteLine(sIFolderName);
doc.Load(sIFolderName);
Console.Write(doc.OuterXml);
Console.ReadLine();
}// end if
}
catch(XmlException xmlEx)
{
Console.WriteLine("Failed to load " + sIFolderName, xmlEx.Message);
}
}
}
}

Thanks
QuestionSerial Communications Pin
McSmack2-Mar-06 7:29
McSmack2-Mar-06 7:29 
Question"unable to connect to remtoe server" error Pin
amresawy2-Mar-06 7:11
amresawy2-Mar-06 7:11 
AnswerRe: Reading data from sound card Pin
Dan Neely2-Mar-06 7:11
Dan Neely2-Mar-06 7:11 
GeneralRe: Reading data from sound card Pin
Dan Neely2-Mar-06 7:44
Dan Neely2-Mar-06 7:44 
Question"Cannot implicitly convert ... " kind of error Pin
Pete Madden2-Mar-06 6:02
Pete Madden2-Mar-06 6:02 
AnswerRe: "Cannot implicitly convert ... " kind of error Pin
leppie2-Mar-06 6:19
leppie2-Mar-06 6:19 
GeneralRe: "Cannot implicitly convert ... " kind of error Pin
Pete Madden2-Mar-06 6:21
Pete Madden2-Mar-06 6:21 
QuestionFinding MousePointer in WinForms Pin
VenkataRamana.Gali2-Mar-06 5:35
VenkataRamana.Gali2-Mar-06 5:35 
GeneralRe: Finding MousePointer in WinForms Pin
Koushik Biswas2-Mar-06 10:18
Koushik Biswas2-Mar-06 10:18 
GeneralRe: Finding MousePointer in WinForms Pin
leppie2-Mar-06 23:02
leppie2-Mar-06 23:02 
QuestionC# App Pin
niceguyeddie19992-Mar-06 5:02
niceguyeddie19992-Mar-06 5:02 
Questionhow can i get summary properties of a video file on my desktop through c# code Pin
samasavinirs2-Mar-06 4:05
samasavinirs2-Mar-06 4:05 
AnswerRe: how can i get summary properties of a video file on my desktop through c# code Pin
Sean892-Mar-06 4:37
Sean892-Mar-06 4:37 
AnswerRe: how can i get summary properties of a video file on my desktop through c# code Pin
Mircea Grelus2-Mar-06 4:58
Mircea Grelus2-Mar-06 4:58 
GeneralRe: how can i get summary properties of a video file on my desktop through c# code Pin
samasavinirs5-Mar-06 17:16
samasavinirs5-Mar-06 17:16 
GeneralRe: how can i get summary properties of a video file on my desktop through c# code Pin
Dan Neely6-Mar-06 2:00
Dan Neely6-Mar-06 2:00 
QuestionDLL releted Error. Pin
Divyang Mithaiwala2-Mar-06 3:19
Divyang Mithaiwala2-Mar-06 3:19 

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.