0

I have a class that exposes a list of data by overloading the index operator (see below). Can I access this from clojure?

double this[int index] { get; } 
1
  • Show us code, it is hard to help without any clue. Commented Oct 21, 2013 at 17:53

2 Answers 2

1
(let [q (|System.Collections.Generic.List`1[System.Int32]|.)] (.Add q 1) (.get_Item q 0)) 
Sign up to request clarification or add additional context in comments.

Comments

0

I don't know any thing about C# programming language but the concept should be the same when you call Java code from Clojure.

To call instance method:

(.methodName objectInstance params...) 

To call static method (assuming C# has static methods):

(ClassName/staticMethod params...) 

2 Comments

Why provide an answer when you are admittedly clueless about the topic? Chances are OP tried basic interop syntax already.
@vemv Sorry but should I ask for your permission to post here?

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.