Results 1 to 12 of 12

Thread: quick translation needed ( c# to vb )

Threaded View

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2003
    Posts
    227

    Arrow quick translation needed ( c# to vb )

    hi,

    it would be very kind if someone helps me out here, i need this code translated to vb.net.

    i understand most of it, like one thing i cant figure out is the " continue" method? whats the equilivent of that in vb.net?!!!

    Code:
    foreach(XmlNode xnode in section.ChildNodes)
    			{	
    				if(!(xnode.NodeType == XmlNodeType.Element && xnode.Attributes != null)) continue ; 
    
    				if(xnode.Attributes["domainlocal"] != null && Convert.ToBoolean(xnode.Attributes["domainlocal"].Value) == false)
    				{
    					//host list needs to be mentioned, if domainlocal is false
    					if(xnode.Attributes["host"] == null)	throw new ApplicationException("Configuration Error : For Single Signon Targets that are not local to the domain, a host list must be provided");
    					_SingleSignonTargetList.Add(new SampleAuthenticationSingleSignonTarget(xnode.Attributes["host"].Value));
    				}
    				else
    				{
    					if(xnode.Attributes["name"] == null)  throw new ApplicationException(" Configuration Error : For Single Signon Targets that are local to the domain, a cookie name must be provided");
    					if(xnode.Attributes["path"] == null)  throw new ApplicationException("Configuration Error : For Single Signon Targets that are local to the domain, a cookie path must be provided");
    					if(xnode.Attributes["persistent"] == null)  throw new ApplicationException("Configuration Error : For Single Signon Targets that are local to the domain, a cookie persistence indicator must be provided");
    					_SingleSignonTargetList.Add(new SampleAuthenticationSingleSignonTarget(xnode.Attributes["name"].Value,xnode.Attributes["path"].Value,Convert.ToBoolean(xnode.Attributes["persistent"].Value)));
    				}
    			}
    Last edited by persianboy; Nov 11th, 2003 at 11:48 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width