Darth Vader 0 Junior Poster in Training

I have a native code that I am trying to convert to managed code.
I have a vector where I use a comparer to sort it in this code:

struct Sorting1
  {
  bool operator () ( const std::string& a, const std::string& b )
    {
    std::stringstream as( a );
    std::stringstream bs( b );
    double ad, bd;
    as >> ad;
    bs >> bd;
    return ad < bd;
    }
  };

std::vector<string> data1;

[B]//Now sort this vector[/B]
 std.sort(data1.rbegin(), data1.rend(), Sorting1());

My ambition is now to convert this code to managed code but have some problems to get it right.
I have started out the code but the compiler underlines "()" and "};" with red so I think I need to something else ?

struct Sorting1
  {
  bool operator () ( const String^& a, const String^& b )
    {

    double ad = 0;
    double bd = 0;
    ad = Convert::ToDouble(a);
    bd = Convert::ToDouble(b);

    return ad < bd;
    }
  };


List<String^> data1 = gcnew List<String^>();

//Now sort this List
 data1.Sort(0, data1.Count, Sorting1);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.