string
직접 특별한 코드없이 인덱싱 할 수 있습니다.
//from metadata
public sealed class String : IComparable, ICloneable, IConvertible, IComparable<string>, IEnumerable<char>, IEnumerable, IEquatable<string>
{
....
// Summary:
// Gets the character at a specified character position in the current System.String
// object.
//
// Parameters:
// index:
// A character position in the current string.
//
// Returns:
// A Unicode character.
//
// Exceptions:
// System.IndexOutOfRangeException:
// index is greater than or equal to the length of this object or less than
// zero.
public char this[int index] { get; }
....
}
dim str = "hello";
dim hchar = str(0);
dim echar = str(1);
dim lchar = str(2);
ect
감사합니다. em3ricasforsale이 나에게 올바른 대답을주었습니다 ... 감사합니다 .-D ... 모든 사람에게 인사합니다. – IWIH
아래에서 말했듯이 그의 코드는 완전히 무의미합니다. 문자열은 직접 색인을 생성 할 수 있습니다. 그냥 mystring (myindex)이라고 말하면 char를 얻습니다. 사용하는 것은 정확히 mystring.ToArray() (myIndex)와 동일합니다. 정확히 mystring (myindex)와 같습니다! – asawyer
'vb'태그는 애매한 것으로 단계적으로 제거되고 인덱스 태그는 데이터베이스와 관련된보다 구체적인 다른 의미를 갖습니다. 그들은 당신의 질문에 속하지 않습니다. –