本文整理汇总了C#中System.String类的典型用法代码示例。如果您正苦于以下问题:C# System.String类的具体用法?C# System.String怎么用?C# System.String使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
System.String类属于命名空间,在下文中一共展示了System.String类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DualMapGoalTest
public DualMapGoalTest(System.String goalState1, System.String goalState2)
{
this.goalState1 = goalState1;
this.goalState2 = goalState2;
goals.Add(goalState1);
goals.Add(goalState2);
}
示例2: AssetTextureSource
// ===========================================================
// Constructors
// ===========================================================
public AssetTextureSource(Context pContext, String pAssetPath)
{
this.mContext = pContext;
this.mAssetPath = pAssetPath;
BitmapFactory.Options decodeOptions = new BitmapFactory.Options();
decodeOptions.InJustDecodeBounds = true;
//InputStream input = null;
System.IO.Stream input = null;
try
{
//input = pContext.getAssets().open(pAssetPath);
input = pContext.Assets.Open(pAssetPath);
BitmapFactory.DecodeStream(input, null, decodeOptions);
}
catch (IOException e)
{
Debug.E("Failed loading Bitmap in AssetTextureSource. AssetPath: " + pAssetPath, e);
}
finally
{
StreamUtils.CloseStream(input);
}
this.mWidth = decodeOptions.OutWidth;
this.mHeight = decodeOptions.OutHeight;
}
示例3: FieldInfo
internal bool storePayloads; // whether this field stores payloads together with term positions
internal FieldInfo(System.String na, bool tk, int nu, bool storeTermVector, bool storePositionWithTermVector, bool storeOffsetWithTermVector, bool omitNorms, bool storePayloads, bool omitTermFreqAndPositions)
{
name = na;
isIndexed = tk;
number = nu;
if (isIndexed)
{
this.storeTermVector = storeTermVector;
this.storeOffsetWithTermVector = storeOffsetWithTermVector;
this.storePositionWithTermVector = storePositionWithTermVector;
this.storePayloads = storePayloads;
this.omitNorms = omitNorms;
this.omitTermFreqAndPositions = omitTermFreqAndPositions;
}
else
{
// for non-indexed fields, leave defaults
this.storeTermVector = false;
this.storeOffsetWithTermVector = false;
this.storePositionWithTermVector = false;
this.storePayloads = false;
this.omitNorms = true;
this.omitTermFreqAndPositions = false;
}
}
示例4: LogVerbose
public static void LogVerbose(String tag, String message, Throwable cause)
{
//noinspection PointlessBooleanExpression,ConstantConditions
if ( Config.Debug && Log.IsLoggable(tag, LogPriority.Verbose)) {
if (cause != null) Log.Verbose(tag, message, cause);
}
}
示例5: TelParsedResult
public TelParsedResult(System.String number, System.String telURI, System.String title)
: base(ParsedResultType.TEL)
{
this.number = number;
this.telURI = telURI;
this.title = title;
}
示例6: AttributedString
/**
* Constructs an {@code AttributedString} from an {@code
* AttributedCharacterIterator}, which represents attributed text.
*
* @param iterator
* the {@code AttributedCharacterIterator} that contains the text
* for this attributed string.
*/
public AttributedString(AttributedCharacterIterator iterator)
{
if (iterator.getBeginIndex() > iterator.getEndIndex()) {
// text.0A=Invalid substring range
throw new java.lang.IllegalArgumentException("Invalid substring range"); //$NON-NLS-1$
}
StringBuilder buffer = new StringBuilder();
for (int i = iterator.getBeginIndex(); i < iterator.getEndIndex(); i++) {
buffer.Append(iterator.current());
iterator.next();
}
text = buffer.ToString();
java.util.Set<AttributedCharacterIteratorNS.Attribute> attributes = iterator
.getAllAttributeKeys();
if (attributes == null) {
return;
}
attributeMap = new java.util.HashMap<AttributedCharacterIteratorNS.Attribute, java.util.List<IAC_Range>>();//(attributes.size() * 4 / 3) + 1);
java.util.Iterator<AttributedCharacterIteratorNS.Attribute> it = attributes.iterator();
while (it.hasNext()) {
AttributedCharacterIteratorNS.Attribute attribute = it.next();
iterator.setIndex(0);
while (iterator.current() != CharacterIteratorConstants.DONE) {
int start = iterator.getRunStart(attribute);
int limit = iterator.getRunLimit(attribute);
System.Object value = iterator.getAttribute(attribute);
if (value != null) {
addAttribute(attribute, value, start, limit);
}
iterator.setIndex(limit);
}
}
}
示例7: NDEFSmartPosterParsedResult
internal NDEFSmartPosterParsedResult(int action, System.String uri, System.String title)
: base(ParsedResultType.NDEF_SMART_POSTER)
{
this.action = action;
this.uri = uri;
this.title = title;
}
示例8: TermVectorEntry
public TermVectorEntry(System.String field, System.String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions)
{
this.field = field;
this.term = term;
this.frequency = frequency;
this.offsets = offsets;
this.positions = positions;
}
示例9: EmailAddressParsedResult
internal EmailAddressParsedResult(System.String emailAddress, System.String subject, System.String body, System.String mailtoURI)
: base(ParsedResultType.EMAIL_ADDRESS)
{
this.emailAddress = emailAddress;
this.subject = subject;
this.body = body;
this.mailtoURI = mailtoURI;
}
示例10: GeoParsedResult
internal GeoParsedResult(System.String geoURI, double latitude, double longitude, double altitude)
: base(ParsedResultType.GEO)
{
this.geoURI = geoURI;
this.latitude = latitude;
this.longitude = longitude;
this.altitude = altitude;
}
示例11: TrackAppEvent
public static void TrackAppEvent(String eventCategory, String eventToTrack)
{
var builder = new HitBuilders.EventBuilder();
builder.SetCategory(eventCategory);
builder.SetAction(eventToTrack);
builder.SetLabel("AppEvent");
Rep.Instance.GaTracker.Send(builder.Build());
}
示例12: StopAnalyzer
static StopAnalyzer()
{
{
var stopWords = new System.String[]{"a", "an", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"};
var stopSet = new CharArraySet(stopWords.Length, false);
stopSet.AddAll(stopWords);
ENGLISH_STOP_WORDS_SET = CharArraySet.UnmodifiableSet(stopSet);
}
}
示例13: uc_formpartsinfo
public uc_formpartsinfo(
System.String p1,
System.Drawing.Point p2,
System.Drawing.Point p3
)
{
param = p1;
prmStartPos = p2;
prmEndPos = p3;
}
示例14: SMSParsedResult
public SMSParsedResult(System.String smsURI, System.String number, System.String via, System.String subject, System.String body, System.String title)
: base(ParsedResultType.SMS)
{
this.smsURI = smsURI;
this.number = number;
this.via = via;
this.subject = subject;
this.body = body;
this.title = title;
}
示例15: TrackAppException
public static void TrackAppException(String activity, String method, string exceptionName, string message, Boolean isFatalException)
{
var builder = new HitBuilders.ExceptionBuilder();
var exceptionMessageToTrack = string.Format("{0}, Method : {1}\nException Name : {2}\nMessage : \n{3}", activity, method,
exceptionName, message);
builder.SetDescription(exceptionMessageToTrack);
builder.SetFatal(isFatalException);
Rep.Instance.GaTracker.Send(builder.Build());
}