- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.6k
Returns: Methods
        Genevieve Warren edited this page Oct 3, 2023 
        ·
        4 revisions
      
    The following table shows the boilerplate wording for return value descriptions within method topics. The wording varies according to the type that's returned.
| Return type | Wording | Examples | 
|---|---|---|
| Task<T> or ValueTask<T> | A task object that, when awaited, produces <XXX>. | Type: Task<String> A task object that, when awaited, produces the response body. | 
| Class, interface, or structure | <Noun phrase description without specifying the data type. Begin with an introductory article.> Note: If the abstraction is not clear from the context, you can use the wording "An object that identifies/specifies/contains XXX." However, avoid this unless there is no other way to describe the return value. | Type: System.Threading.Thread The new thread. Type: System.IAsyncResult The posted asynchronous request. | 
| Flag enum | A bitwise combination of the enumeration values <additional information, if necessary>. | Type: System.IO.FileAccess A bitwise combination of the enumeration values. | 
| Other enum | One of the enumeration values <additional information, if necessary>. | Type: System.Windows.Forms.DialogResult One of the enumeration values that indicates the return value of a dialog box. | 
| Boolean | true if XXX; otherwise, false. true if XXX; false if XXX. Note: Use the "otherwise" wording unless the second condition must be noted explicitly. Note: The wording for Boolean return values is "true if...," not "true to...." (The wording "true to...." is for parameters.) | Type: System.Boolean true if the specified path refers to a file; otherwise, false. Type: System.Boolean true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. For ShouldSerialize <Property> methods, use this phrasing: Type:System.Boolean true if the InputBindings property value should be serialized; otherwise, false. | 
| Other primitive or string | <Noun phrase description, without specifying the data type. Begin with an introductory article.> | Type: System.String The string being read. Type: System.Int32 The hash code for the current SortDescription object. | 
| Array | An array XXX. | Type: System.Reflection.FieldInfo() An array that contains the fields implemented by a type. |