Skip to content

Commit de83b77

Browse files
CopilotBillWagner
andauthored
Update CType terminology from "Function" to "Operator" and move to Operators section (#48155)
* Initial plan * Update CType terminology from Function to Operator in core documentation Co-authored-by: BillWagner <[email protected]> * Complete CType terminology updates in language reference and procedures Co-authored-by: BillWagner <[email protected]> * Move CType from Functions to Operators section and update all references Co-authored-by: BillWagner <[email protected]> * Fix relative references to CType operator within operators folder Co-authored-by: BillWagner <[email protected]> * Fix relative file links to CType operator in language reference files Co-authored-by: BillWagner <[email protected]> * Apply suggestions from code review --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: BillWagner <[email protected]> Co-authored-by: Bill Wagner <[email protected]>
1 parent 358b285 commit de83b77

35 files changed

+60
-56
lines changed

.openpublishing.redirection.visual-basic.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,6 +1286,11 @@
12861286
{
12871287
"source_path_from_root": "/docs/visual-basic/sample-applications.md",
12881288
"redirect_url": "/samples/browse/?languages=vb"
1289+
},
1290+
{
1291+
"source_path_from_root": "/docs/visual-basic/language-reference/functions/ctype-function.md",
1292+
"redirect_url": "/dotnet/visual-basic/language-reference/operators/ctype-operator",
1293+
"redirect_document_id": true
12891294
}
12901295
]
12911296
}

docs/framework/data/adonet/sql/linq/basic-data-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Because LINQ to SQL queries translate to Transact-SQL before they are executed o
1010

1111
## Casting
1212

13-
Implicit or explicit casts are enabled from a source CLR type to a target CLR type if there is a similar valid conversion within SQL Server. For more information about CLR casting, see [CType Function](../../../../../visual-basic/language-reference/functions/ctype-function.md) (Visual Basic) and [Type-testing and cast operators](../../../../../csharp/language-reference/operators/type-testing-and-cast.md). After conversion, casts change the behavior of operations performed on a CLR expression to match the behavior of other CLR expressions that naturally map to the destination type. Casts are also translatable in the context of inheritance mapping. Objects can be cast to more specific entity subtypes so that their subtype-specific data can be accessed.
13+
Implicit or explicit casts are enabled from a source CLR type to a target CLR type if there is a similar valid conversion within SQL Server. For more information about CLR casting, see [CType Function](../../../../../visual-basic/language-reference/operators/ctype-operator.md) (Visual Basic) and [Type-testing and cast operators](../../../../../csharp/language-reference/operators/type-testing-and-cast.md). After conversion, casts change the behavior of operations performed on a CLR expression to match the behavior of other CLR expressions that naturally map to the destination type. Casts are also translatable in the context of inheritance mapping. Objects can be cast to more specific entity subtypes so that their subtype-specific data can be accessed.
1414

1515
## Equality Operators
1616

docs/visual-basic/language-reference/data-types/boolean-data-type.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ End If
6060
- [Conversion Summary](../keywords/conversion-summary.md)
6161
- [Efficient Use of Data Types](../../programming-guide/language-features/data-types/efficient-use-of-data-types.md)
6262
- [Troubleshooting Data Types](../../programming-guide/language-features/data-types/troubleshooting-data-types.md)
63-
- [CType Function](../functions/ctype-function.md)
63+
- [CType Operator](../operators/ctype-operator.md)

docs/visual-basic/language-reference/error-messages/latebound-overload-resolution-cannot-be-applied.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ Each of the preceding lines of code explicitly casts the `Object` variable `o1`
6565

6666
- [Procedure Overloading](../../programming-guide/language-features/procedures/procedure-overloading.md)
6767
- [Overload Resolution](../../programming-guide/language-features/procedures/overload-resolution.md)
68-
- [CType Function](../functions/ctype-function.md)
68+
- [CType Operator](../operators/ctype-operator.md)

docs/visual-basic/language-reference/functions/conversion-functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ ms.assetid: 8a8fb553-a8ac-424e-8103-26eea25eaa71
3434
- [CShort Function](type-conversion-functions.md)
3535
- [CSng Function](type-conversion-functions.md)
3636
- [CStr Function](type-conversion-functions.md)
37-
- [CType Function](ctype-function.md)
37+
- [CType Operator](../operators/ctype-operator.md)
3838
- [CUInt Function](type-conversion-functions.md)
3939
- [CULng Function](type-conversion-functions.md)
4040
- [CUShort Function](type-conversion-functions.md)

docs/visual-basic/language-reference/functions/index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ The topics in this section contain tables of the Visual Basic run-time member fu
2424

2525
[Type Conversion Functions](type-conversion-functions.md)
2626

27-
[CType Function](ctype-function.md)
28-
2927
## Related Sections
3028

3129
[Visual Basic Language Reference](../index.md)

docs/visual-basic/language-reference/functions/type-conversion-functions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,9 @@ Dim i3 As Integer = CInt(Math.Round(s)) ' Result: 174
188188

189189
If you need to convert to or from a string representation of a value in a format other than the one specified by your locale, you cannot use the Visual Basic type conversion functions. To do this, use the `ToString(IFormatProvider)` and `Parse(String, IFormatProvider)` methods of that value's type. For example, use <xref:System.Double.Parse%2A?displayProperty=nameWithType> when converting a string to a `Double`, and use <xref:System.Double.ToString%2A?displayProperty=nameWithType> when converting a value of type `Double` to a string.
190190

191-
## CType Function
191+
## CType Operator
192192

193-
The [CType Function](ctype-function.md) takes a second argument, `typename`, and coerces `expression` to `typename`, where `typename` can be any data type, structure, class, or interface to which there exists a valid conversion.
193+
The [CType Operator](../operators/ctype-operator.md) takes a second argument, `typename`, and coerces `expression` to `typename`, where `typename` can be any data type, structure, class, or interface to which there exists a valid conversion.
194194

195195
For a comparison of `CType` with the other type conversion keywords, see [DirectCast Operator](../operators/directcast-operator.md) and [TryCast Operator](../operators/trycast-operator.md).
196196

docs/visual-basic/language-reference/keywords/conversion-summary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Visual Basic language keywords and run-time library members are organized by pur
2020
|Convert date to serial number.|<xref:Microsoft.VisualBasic.DateAndTime.DateSerial%2A>, <xref:Microsoft.VisualBasic.DateAndTime.DateValue%2A>|
2121
|Convert decimal number to other bases.|<xref:Microsoft.VisualBasic.Conversion.Hex%2A>, <xref:Microsoft.VisualBasic.Conversion.Oct%2A>|
2222
|Convert number to string.|<xref:Microsoft.VisualBasic.Strings.Format%2A>, <xref:Microsoft.VisualBasic.Conversion.Str%2A>|
23-
|Convert one data type to another.|[CBool](../functions/type-conversion-functions.md), [CByte](../functions/type-conversion-functions.md), [CDate](../functions/type-conversion-functions.md), [CDbl](../functions/type-conversion-functions.md), [CDec](../functions/type-conversion-functions.md), [CInt](../functions/type-conversion-functions.md), [CLng](../functions/type-conversion-functions.md), [CSng](../functions/type-conversion-functions.md), [CShort](../functions/type-conversion-functions.md), [CStr](../functions/type-conversion-functions.md), [CType](../functions/ctype-function.md), <xref:Microsoft.VisualBasic.Conversion.Fix%2A>, <xref:Microsoft.VisualBasic.Conversion.Int%2A>|
23+
|Convert one data type to another.|[CBool](../functions/type-conversion-functions.md), [CByte](../functions/type-conversion-functions.md), [CDate](../functions/type-conversion-functions.md), [CDbl](../functions/type-conversion-functions.md), [CDec](../functions/type-conversion-functions.md), [CInt](../functions/type-conversion-functions.md), [CLng](../functions/type-conversion-functions.md), [CSng](../functions/type-conversion-functions.md), [CShort](../functions/type-conversion-functions.md), [CStr](../functions/type-conversion-functions.md), [CType](../operators/ctype-operator.md), <xref:Microsoft.VisualBasic.Conversion.Fix%2A>, <xref:Microsoft.VisualBasic.Conversion.Int%2A>|
2424
|Convert date to day, month, weekday, or year.|<xref:Microsoft.VisualBasic.DateAndTime.Day%2A>, <xref:Microsoft.VisualBasic.DateAndTime.Month%2A>, <xref:Microsoft.VisualBasic.DateAndTime.Weekday%2A>, <xref:Microsoft.VisualBasic.DateAndTime.Year%2A>|
2525
|Convert time to hour, minute, or second.|<xref:Microsoft.VisualBasic.DateAndTime.Hour%2A>, <xref:Microsoft.VisualBasic.DateAndTime.Minute%2A>, <xref:Microsoft.VisualBasic.DateAndTime.Second%2A>|
2626
|Convert string to ASCII value.|<xref:Microsoft.VisualBasic.Strings.Asc%2A>, <xref:Microsoft.VisualBasic.Strings.AscW%2A>|

docs/visual-basic/language-reference/modifiers/narrowing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ Indicates that a conversion operator (`CType`) converts a class or structure to
3434
- [Widening](widening.md)
3535
- [Widening and Narrowing Conversions](../../programming-guide/language-features/data-types/widening-and-narrowing-conversions.md)
3636
- [How to: Define an Operator](../../programming-guide/language-features/procedures/how-to-define-an-operator.md)
37-
- [CType Function](../functions/ctype-function.md)
37+
- [CType Operator](../operators/ctype-operator.md)
3838
- [Option Strict Statement](../statements/option-strict-statement.md)

docs/visual-basic/language-reference/modifiers/widening.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ Indicates that a conversion operator (`CType`) converts a class or structure to
3636
- [Narrowing](narrowing.md)
3737
- [Widening and Narrowing Conversions](../../programming-guide/language-features/data-types/widening-and-narrowing-conversions.md)
3838
- [How to: Define an Operator](../../programming-guide/language-features/procedures/how-to-define-an-operator.md)
39-
- [CType Function](../functions/ctype-function.md)
39+
- [CType Operator](../operators/ctype-operator.md)
4040
- [Option Strict Statement](../statements/option-strict-statement.md)
4141
- [How to: Define a Conversion Operator](../../programming-guide/language-features/procedures/how-to-define-a-conversion-operator.md)

0 commit comments

Comments
 (0)