本文整理汇总了C#中System.String.Equals方法的典型用法代码示例。如果您正苦于以下问题:C# System.String.Equals方法的具体用法?C# System.String.Equals怎么用?C# System.String.Equals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.String
的用法示例。
在下文中一共展示了System.String.Equals方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: readChemSequence
private IChemSequence readChemSequence(IChemSequence sequence)
{
IChemModel chemModel = sequence.Builder.newChemModel();
ICrystal crystal = null;
// Get the info line (first token of the first line)
//UPGRADE_ISSUE: Method 'java.io.BufferedReader.mark' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaioBufferedReadermark_int'"
//inputBuffer.mark(255);
//long pos = inputBuffer.BaseStream.Position;
info = nextVASPToken(false);
//System.out.println(info);
//UPGRADE_ISSUE: Method 'java.io.BufferedReader.reset' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaioBufferedReaderreset'"
//inputBuffer.reset();
// Get the number of different atom "NCLASS=X"
//UPGRADE_ISSUE: Method 'java.io.BufferedReader.mark' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaioBufferedReadermark_int'"
//inputBuffer.mark(255);
nextVASPTokenFollowing("NCLASS");
ntype = System.Int32.Parse(fieldVal);
//System.out.println("NCLASS= " + ntype);
//UPGRADE_ISSUE: Method 'java.io.BufferedReader.reset' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaioBufferedReaderreset'"
//inputBuffer.reset();
// Get the different atom names
anames = new System.String[ntype];
nextVASPTokenFollowing("ATOM");
for (int i = 0; i < ntype; i++)
{
anames[i] = fieldVal;
nextVASPToken(false);
}
// Get the number of atom of each type
int[] natom_type = new int[ntype];
natom = 0;
for (int i = 0; i < ntype; i++)
{
natom_type[i] = System.Int32.Parse(fieldVal);
nextVASPToken(false);
natom = natom + natom_type[i];
}
// Get the representation type of the primitive vectors
// only "Direct" is recognize now.
representation = fieldVal;
if (representation.Equals("Direct"))
{
//logger.info("Direct representation");
// DO NOTHING
}
else
{
throw new CDKException("This VASP file is not supported. Please contact the Jmol developpers");
}
while (nextVASPToken(false) != null)
{
//logger.debug("New crystal started...");
crystal = sequence.Builder.newCrystal();
chemModel = sequence.Builder.newChemModel();
// Get acell
for (int i = 0; i < 3; i++)
{
acell[i] = FortranFormat.atof(fieldVal); // all the same FIX?
}
// Get primitive vectors
for (int i = 0; i < 3; i++)
{
for (int j = 0; j < 3; j++)
{
nextVASPToken(false);
rprim[i][j] = FortranFormat.atof(fieldVal);
}
}
// Get atomic position
int[] atomType = new int[natom];
double[][] xred = new double[natom][];
for (int i2 = 0; i2 < natom; i2++)
{
xred[i2] = new double[3];
}
int atomIndex = 0;
for (int i = 0; i < ntype; i++)
{
for (int j = 0; j < natom_type[i]; j++)
{
try
{
atomType[atomIndex] = IsotopeFactory.getInstance(sequence.Builder).getElement(anames[i]).AtomicNumber;
}
catch (System.Exception exception)
{
throw new CDKException("Could not determine atomic number!", exception);
//.........这里部分代码省略.........