Can't use SortedSet type for sorted RaycastAll

I would want to implement a system for my bullets to pass through walls. I need to use the SortedSet type to make a system similar to this one: (see Scott Kovacs’ answer)

http://answers.unity3d.com/questions/22261/sorting-builtin-arrays.html

I included those:

using UnityEngine;
using System;
using System.Collections;
using System.Collections.Generic;

and I initialized my SortedSet like that:

SortedSet raycastResults = new SortedSet();

but it gave me an error, saying it couldn’t recognize the SortedSet type.

error CS0246: The type or namespace name SortedSet1' could not be found. Are you missing a using directive or an assembly reference?

isn’t SortedSet supposed to be defined in System.Collections.Generic? That’s what I can read everywhere. Am I missing something?

If you check the Mono Compatibility Page you’ll see that Unity do not include SortedSet. It does include SortedList, so you can use it instead.