It depends on what your filter is selecting on whether the cast you have will work. As you don't provide details on the exact error you are getting it is hard to be more precise.
Also you have in one place (Opening) used as your cast yet you use the full type name "Autodesk.Revit.DB.Opening" when you create your list. If you really need to do that maybe Opening is not the "Opening" you thought it was.
You can also use element.Cast() to perform the cast.
Likewise if you know that all your elements returned by the filter are only ever going to be Opening types then you can use
collector.WherePasses(designOptionFilter).Cast<Opening>()
to achieve the same thing.