Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Adding missing String members to coreclr#7142

Merged
joperezr merged 2 commits into
dotnet:masterfrom
joperezr:FillOutMissingStringMembers
Sep 12, 2016
Merged

Adding missing String members to coreclr#7142
joperezr merged 2 commits into
dotnet:masterfrom
joperezr:FillOutMissingStringMembers

Conversation

@joperezr
Copy link
Copy Markdown
Member

cc: @stephentoub @weshaggard

Adding missing members to String.

related issue: dotnet/corefx#10216

public CharEnumerator GetEnumerator() {
Contract.Ensures(Contract.Result<CharEnumerator>() != null);
Contract.EndContractBlock();
BCLDebug.Perf(false, "Avoid using String's CharEnumerator until C# special cases foreach on String - use the indexed property on String instead.");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this Perf call do? Is it an assert? I'm wondering if we need to remove it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also thought it might be like an assert, if you see we also have it in some other already public members like line 864 or 872 of this same file, so I doubt that we have to do anything special. @weshaggard do you know if we have to remove that line?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what that actually does.

@stephentoub
Copy link
Copy Markdown
Member

LGTM

@joperezr
Copy link
Copy Markdown
Member Author

In order for CI to pass, I had to remove member:

Concat(System.Object,System.Object,System.Object,System.Object,__arglist)

since it depends on ArgIterator which we still don't know if we are going to port or not.

@joperezr joperezr merged commit cbd1f37 into dotnet:master Sep 12, 2016
@joperezr joperezr deleted the FillOutMissingStringMembers branch September 12, 2016 18:42
@weshaggard
Copy link
Copy Markdown
Member

FYI @tarekgh looks like the string.GetEnumerator() method is exposed here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants