using System;
using System.Collections .Generic ;
using System.Linq ;
using System.Text ;
namespace Test
{
public class Test
{
public delegate Tuple< int , int> func( char [ ] c, int i) ;
public Dictionary< char , Delegate> func;
public Test( )
{
func = new Dictionary< char , Delegate> ( ) ;
func[ 'l' ] = new func( list) ;
//func['d'] =
}
public Tuple< int [ ] , int> list( char [ ] x, int f)
{
List< int> r = new List< int> ( ) ;
f = f+ 1 ;
while ( x[ f] != 'e' )
{
int v = f = func[ x[ f] ] ( x, f) ; //ここでメソッド名が必要ですと言われる
r.Add ( v) ;
}
return Tuple.Create < int [ ] , int> ( r.ToArray < int> ( ) , f + 1 ) ;
}
}
}
dXNpbmcgU3lzdGVtOwp1c2luZyBTeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYzsKdXNpbmcgU3lzdGVtLkxpbnE7CnVzaW5nIFN5c3RlbS5UZXh0OwoKbmFtZXNwYWNlIFRlc3QKewogICAgcHVibGljIGNsYXNzIFRlc3QKICAgIHsKICAgICAgICBwdWJsaWMgZGVsZWdhdGUgVHVwbGU8aW50LCBpbnQ+IGZ1bmMoY2hhcltdIGMsIGludCBpKTsKICAgICAgICBwdWJsaWMgRGljdGlvbmFyeTxjaGFyLCBEZWxlZ2F0ZT4gZnVuYzsKCiAgICAgICAgcHVibGljIFRlc3QoKQogICAgICAgIHsKICAgICAgICAgICAgZnVuYyA9IG5ldyBEaWN0aW9uYXJ5PGNoYXIsIERlbGVnYXRlPigpOwogICAgICAgICAgICBmdW5jWydsJ10gPSBuZXcgZnVuYyhsaXN0KTsKICAgICAgICAgICAgLy9mdW5jWydkJ10gPQogICAgICAgIH0KCiAgICAgICAgcHVibGljIFR1cGxlPGludFtdLCBpbnQ+IGxpc3QoY2hhcltdIHgsIGludCBmKQogICAgICAgIHsKICAgICAgICAgICAgTGlzdDxpbnQ+IHIgPSBuZXcgTGlzdDxpbnQ+KCk7CiAgICAgICAgICAgIGYgPSBmKzE7CiAgICAgICAgICAgIHdoaWxlICh4W2ZdICE9ICdlJykKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgaW50IHYgPSBmID0gZnVuY1t4W2ZdXSh4LCBmKTsgLy/jgZPjgZPjgafjg6Hjgr3jg4Pjg4nlkI3jgYzlv4XopoHjgafjgZnjgajoqIDjgo/jgozjgosKICAgICAgICAgICAgICAgIHIuQWRkKHYpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiBUdXBsZS5DcmVhdGU8aW50W10sIGludD4oci5Ub0FycmF5PGludD4oKSwgZiArIDEpOwogICAgICAgIH0KICAgIH0KfQo=
compilation info
prog.cs(11,43): error CS0102: The type `Test.Test' already contains a definition for `func'
prog.cs(10,41): (Location of the symbol related to previous error)
Compilation failed: 1 error(s), 0 warnings
stdout