Support Requests item #1107818, was opened at 2005-01-23 16:27
Message generated for change (Comment added) made by bobbyangers
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=474852&aid=1107818&group_id=54790

Category: None
Group: None
Status: Closed
Priority: 5
Submitted By: Robert C. Angers (bobbyangers)
Assigned to: Gert Driesen (drieseng)
Summary: msi IsVersion

Initial Comment:
must encapsulate the try catch, sometime the Version 
ref is NULL


        protected static bool IsVersion(ref string Version) {
            // For cases of 5,5,2,2
                                        try
                                        {
                                        
        Version = Version.Trim().Replace(",", ".");
                                        
        Version = Version.Replace(" ", "");
                                        
        string[] versionParts = Version.Split('.');
                                        
        bool result = true;

                                        
        foreach (string versionPart in versionParts) 
                                                
                Convert.ToInt32(versionPart);
                                        }
                                        catch
                                        {
                                        
        result = false;
                                        }
          
                                        return 
result;
        }

----------------------------------------------------------------------

>Comment By: Robert C. Angers (bobbyangers)
Date: 2005-01-24 01:12

Message:
Logged In: YES 
user_id=746223

Hi, Just checked the CVS, I agree, the "Guard clause" is a 
better approach.  Thanks

----------------------------------------------------------------------

Comment By: Gert Driesen (drieseng)
Date: 2005-01-23 18:53

Message:
Logged In: YES 
user_id=707851

This is now fixed in CVS.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=474852&aid=1107818&group_id=54790


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
NAntContrib-Developer mailing list
NAntContrib-Developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nantcontrib-developer

Reply via email to