GetAssertion() method in SAMLResponse is not present for ComponentSpace2 GetAssertion() 2.6.0.21 version (my actual version is 2.5.0.5)

Which is the equivalent method in 2.6.0.21 version?

GetAssertion was added as a convenience method in a subsequent release.
You can use the SAMLResponse.Assertions property which returns a list of the signed, unsigned and encrypted assertions although typically a SAML response will only have one of these.
The list may contain unencrypted and unsigned SAML assertions as SAMLAssertion objects, signed SAML assertions as XmlElement objects, and encrypted SAML assertions as EncryptedAssertion objects.
The SAMLResponse class is part of the SAML low-level API.
Wherever possible we recommend using the SAML high-level API as it’s easier to use.