Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello all,

I have got a peciece of java code, and need to covert to C#.

it's about Iterable interface, but i am not fimilar with that.

the totall project code is in the
https://github.com/x2adrew/CS356_CalFuzzer/blob/47098cee77ca4add6b7a8fd94735ac667c24e335/src/benchmarks/detinfer/pj/edu/rit/compbio/phyl/.svn/text-base/DnaSequenceList.java.svn-base[^]

the block of Iterable defination is as following:(Thanks!)

/**
* Returns an iterator for the DNA sequences in this list.
*
* @return Iterator.
*/
public Iterator<dnasequence> iterator()
{
return new Iterator<dnasequence>()
{
int i = 0;
public boolean hasNext()
{
return i < mySequence.length;
}
public DnaSequence next()
{
return mySequence[i++];
}
public void remove()
{
throw new UnsupportedOperationException();
}
};
}
Posted
Updated 13-Feb-15 4:53am
v2
Comments
Sergey Alexandrovich Kryukov 13-Feb-15 10:52am    
What have you tried so far?
—SA

You may want to study this topic: https://msdn.microsoft.com/en-us/library/dscyy5s0.aspx[^].

—SA
 
Share this answer
 
Comments
Abhinav S 13-Feb-15 11:11am    
5. Online tools can be tried for conversion though.
Sergey Alexandrovich Kryukov 13-Feb-15 11:15am    
Thank you, Abhinav.
I commented on your answer.
—SA
There are some online tools that will do the conversion for you. Try them.
Here is one such link - https://www.varycode.com[^]. Free version is limited but you can try it out.
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 13-Feb-15 11:14am    
You could at least provide a link to one...
—SA
Abhinav S 13-Feb-15 11:19am    
Link added.
Sergey Alexandrovich Kryukov 13-Feb-15 11:45am    
5ed.
—SA
Abhinav S 13-Feb-15 11:48am    
Thank you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900