ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Error in .net sample using visual studio

Post new topic  Reply to topic
 Error in .net sample using visual studio « View previous topic :: View next topic » 
Author Message
nwaradkar
PostPosted: Wed May 23, 2012 8:19 pm    Post subject: Error in .net sample using visual studio Reply with quote

Novice

Joined: 25 Jul 2011
Posts: 18

Hi there,

I am getting the following error when I tried to code in the Visual studio
foll is code

NBElement root = inputMessage.RootElement;
#region UserCode

switch (root(NBParsers.XMLNSC.ParserName).LastChild.Name)
{
..so on

It is giving error as

Error 8 'root' is a 'variable' but is used like a 'method' \FilterNode.cs 31 21 BrokerCSharpProject1

can anybody provide me a solution..

Back to top
View user's profile Send private message
mgk
PostPosted: Thu May 24, 2012 2:12 am    Post subject: Reply with quote

Padawan

Joined: 31 Jul 2003
Posts: 1642

Hi, your code:

Code:
switch (root(NBParsers.XMLNSC.ParserName).LastChild.Name)


should be more like this:

Code:
switch (root[NBParsers.XMLNSC.ParserName].LastChild.Name)


Also if you add this using alias at the top of your code:

Code:
using XMLNSC = NBParsers.XMLNSC;


Then you can simplify your switch to this:

Code:
switch (root[XMLNSC.ParserName].LastChild.Name)


Kind Regards,
_________________
MGK
The postings I make on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Error in .net sample using visual studio
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.