Skip to content

Commit db3c949

Browse files
Copilotwadepickett
andauthored
Fix incorrect property name in protobuf C# code example (#36957)
* Initial plan * Fix incorrect property name 'Time' to 'Start' in protobuf.md C# example Agent-Logs-Url: https://github.com/dotnet/AspNetCore.Docs/sessions/c1ac3d62-e2a0-486d-bdb1-ba805d8b8283 Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com> * Apply suggestion from @wadepickett --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: wadepickett <10985336+wadepickett@users.noreply.github.com> Co-authored-by: Wade Pickett <wpickett@microsoft.com>
1 parent 78fac5e commit db3c949

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

aspnetcore/grpc/protobuf.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ author: jamesnk
44
description: Learn how to create Protobuf messages for .NET apps.
55
monikerRange: '>= aspnetcore-3.0'
66
ms.author: wpickett
7-
ms.date: 02/12/2021
7+
ms.date: 04/07/2026
88
uid: grpc/protobuf
99
---
1010
# Create Protobuf messages for .NET apps
@@ -107,12 +107,12 @@ The generated properties in the C# class aren't the .NET date and time types. Th
107107
// Create Timestamp and Duration from .NET DateTimeOffset and TimeSpan.
108108
var meeting = new Meeting
109109
{
110-
Time = Timestamp.FromDateTimeOffset(meetingTime), // also FromDateTime()
110+
Start = Timestamp.FromDateTimeOffset(meetingTime), // also FromDateTime()
111111
Duration = Duration.FromTimeSpan(meetingLength)
112112
};
113113

114114
// Convert Timestamp and Duration to .NET DateTimeOffset and TimeSpan.
115-
var time = meeting.Time.ToDateTimeOffset();
115+
var time = meeting.Start.ToDateTimeOffset();
116116
var duration = meeting.Duration?.ToTimeSpan();
117117
```
118118

0 commit comments

Comments
 (0)