Ambiguous match

Using (or providing) Microsoft.NET Classes

Ambiguous match

Postby thomasp on Tue Oct 04, 2011 9:28 am

I wrote the following function for fetching a certificate from the store (via thumbprint).

      res←yNETX509CertificateFromStoreGet rarg;⎕USING;store;certCollection;certThumbprint;valid;cert
⎕USING,←⊂'System.Security.Cryptography.X509Certificates,System.dll'
certThumbprint valid←rarg
store←X509Store.New StoreName.My StoreLocation.CurrentUser
store.Open⊂OpenFlags.ReadOnly
certCollection←store.Certificates.Find X509FindType.FindByThumbprint certThumbprint valid
:If 1=certCollection.Count
cert←certCollection.Item⊂0
res←0 cert
:Else
res←¯2 ⍬
:EndIf


It works, but when I hit this line:

      cert←certCollection.Item⊂0


I get a "Dyalog APL/W - Status" window saying:

Ambiguous match: First Entry called
System.Security.Cryptography.X509Certificates.X509Certificate2 get_Item(Int32)
System.Security.Cryptography.X509Certificates.X509Certificate get_Item(Int32)


Why does it say that? What's "Ambiguous" about it? Can I improve the code somehow to make the ambiguity go away?
Thomas
thomasp
 
Posts: 3
Joined: Tue Mar 02, 2010 7:06 am

Re: Ambiguous match

Postby Vince|Dyalog on Wed Oct 05, 2011 3:11 pm

Hi Thomas,

I'll ask my colleague to have a look at your question.

Regards,

Vince
Vince|Dyalog
 
Posts: 412
Joined: Wed Oct 01, 2008 9:39 am

Re: Ambiguous match

Postby thomasp on Mon Oct 31, 2011 5:42 am

*bump*
Thomas
thomasp
 
Posts: 3
Joined: Tue Mar 02, 2010 7:06 am


Return to Microsoft.NET

Who is online

Users browsing this forum: No registered users and 1 guest