Skip to content

Commit 7ce9f87

Browse files
authored
changed files by pdets auto publish service, publishid[801b4fe8-d8f9-4b49-96ee-41fb0f619b69] and do [publish].
1 parent 3b590c1 commit 7ce9f87

17 files changed

+86
-64
lines changed

learn-pr/wwl-azure/discover-interfaces/1-introduction.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Introduction
44
metadata:
55
title: Introduction
66
description: "Introduction"
7-
ms.date: 02/12/2025
7+
ms.date: 02/13/2025
88
author: wwlpublish
99
ms.author: eric
1010
ms.topic: unit

learn-pr/wwl-azure/discover-interfaces/2-understand-interfaces.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
### YamlMime:ModuleUnit
22
uid: learn.wwl.discover-interfaces.understand-interfaces
3-
title: Understand Interfaces
3+
title: Understand interfaces
44
metadata:
5-
title: Understand Interfaces
6-
description: "Understand Interfaces in C# code."
7-
ms.date: 02/12/2025
5+
title: Understand interfaces
6+
description: "Understand interfaces in C# code."
7+
ms.date: 02/13/2025
88
author: wwlpublish
99
ms.author: eric
1010
ms.topic: unit

learn-pr/wwl-azure/discover-interfaces/3-create-interface-properties.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ uid: learn.wwl.discover-interfaces.create-interface-properties
33
title: Implement interface properties
44
metadata:
55
title: Implement interface properties
6-
description: "Implement interface properties"
7-
ms.date: 02/12/2025
6+
description: "Implemnt interface properties in C# code."
7+
ms.date: 02/13/2025
88
author: wwlpublish
99
ms.author: eric
1010
ms.topic: unit

learn-pr/wwl-azure/discover-interfaces/4-create-interface-methods.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Create interface methods
44
metadata:
55
title: Create interface methods
66
description: "Create interface methods in C# code."
7-
ms.date: 02/12/2025
7+
ms.date: 02/13/2025
88
author: wwlpublish
99
ms.author: eric
1010
ms.topic: unit
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
### YamlMime:ModuleUnit
2-
uid: learn.wwl.discover-interfaces.understand-the-value-of-interfaces
2+
uid: learn.wwl.discover-interfaces.understand-value-interfaces
33
title: Understand the value of interfaces
44
metadata:
55
title: Understand the value of interfaces
66
description: "Understand the value of interfaces in C# code."
7-
ms.date: 02/12/2025
7+
ms.date: 02/13/2025
88
author: wwlpublish
99
ms.author: eric
1010
ms.topic: unit
1111
durationInMinutes: 5
1212
content: |
13-
[!include[](includes/5-understand-the-value-of-interfaces.md)]
13+
[!include[](includes/5-understand-value-interfaces.md)]

learn-pr/wwl-azure/discover-interfaces/6-exercise-implement-interfaces-in-project.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.discover-interfaces.exercise-implement-interfaces-project
3+
title: 'Exercise: Implement interfaces in project'
4+
metadata:
5+
title: 'Exercise: Implement interfaces in project'
6+
description: "Exercise: Implement interfaces in project with C#."
7+
ms.date: 02/13/2025
8+
author: wwlpublish
9+
ms.author: eric
10+
ms.topic: unit
11+
durationInMinutes: 20
12+
content: |
13+
[!include[](includes/6-exercise-implement-interfaces-project.md)]

learn-pr/wwl-azure/discover-interfaces/7-knowledge-check.yml

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,55 @@ title: Knowledge check
44
metadata:
55
title: Knowledge check
66
description: "Knowledge check."
7-
ms.date: 02/12/2025
7+
ms.date: 02/13/2025
88
author: wwlpublish
99
ms.author: eric
1010
ms.topic: unit
1111
durationInMinutes: 2
12-
content: |
13-
[!include[](includes/7-knowledge-check.md)]
12+
quiz:
13+
title: "Check your knowledge"
14+
questions:
15+
- content: "Which of the following is true about properties in an interface?"
16+
choices:
17+
- content: "They can have instance data fields."
18+
isCorrect: false
19+
explanation: "Incorrect. Properties in an interface don't declare instance data fields."
20+
- content: "They typically don't have a body."
21+
isCorrect: true
22+
explanation: "Correct. Interface properties typically don't have a body; they only define accessors."
23+
- content: "They must be static."
24+
isCorrect: false
25+
explanation: "Incorrect. Interface properties are not required to be static."
26+
- content: "You're implementing an interface in a class. What must you ensure?"
27+
choices:
28+
- content: "Provide public, non-static implementations for all interface members."
29+
isCorrect: true
30+
explanation: "Correct. When a class implements an interface, it must provide public, non-static implementations for all interface members."
31+
- content: "Provide private implementations for all interface members."
32+
isCorrect: false
33+
explanation: "Incorrect. Interface members must be implemented as public, not private."
34+
- content: "Provide static implementations for all interface members."
35+
isCorrect: false
36+
explanation: "Incorrect. Interface members should be implemented as non-static."
37+
- content: "In a scenario where you need to implement an interface in a class, what syntax is used?"
38+
choices:
39+
- content: "class ClassName : InterfaceName"
40+
isCorrect: true
41+
explanation: "Correct. The correct syntax to implement an interface in a class is 'class ClassName : InterfaceName'."
42+
- content: "class ClassName implements InterfaceName"
43+
isCorrect: false
44+
explanation: "Incorrect. The 'implements' keyword is not used in C#; the correct keyword is ':'."
45+
- content: "class ClassName extends InterfaceName"
46+
isCorrect: false
47+
explanation: "Incorrect. The 'extends' keyword is not used in C#; the correct keyword is ':'."
48+
- content: "What is a key benefit of using interfaces in C# programming?"
49+
choices:
50+
- content: "They allow for better code organization and flexibility."
51+
isCorrect: true
52+
explanation: "Correct. Interfaces provide a way to define contracts for classes, enabling better code organization and flexibility."
53+
- content: "They allow classes to inherit from multiple base classes."
54+
isCorrect: false
55+
explanation: "Incorrect. Interfaces don't allow multiple inheritance of classes; they allow a class to implement multiple interfaces."
56+
- content: "They provide default implementations for all members."
57+
isCorrect: false
58+
explanation: "Incorrect. Interfaces may define default implementations for some members starting with C# 8.0, but this is not their primary benefit."

learn-pr/wwl-azure/discover-interfaces/8-summary.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Summary
44
metadata:
55
title: Summary
66
description: "Summary."
7-
ms.date: 02/12/2025
7+
ms.date: 02/13/2025
88
author: wwlpublish
99
ms.author: eric
1010
ms.topic: unit

learn-pr/wwl-azure/discover-interfaces/includes/2-understand-interfaces.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
An interface is like a to-do list or a contract. It outlines what jobs need to be done, without specifying how these jobs should be done. The contract nature of interfaces allows for the accomplishment of different tasks in their own unique ways.
1+
An interface is like a to-do list or a contract. It outlines what jobs need to be done, without specifying how these jobs should be done. The contract nature of interfaces allows for multiple classes to accomplish the same tasks in their own unique ways.
22

33
### Interfaces are like a contract
44

55
Each of them - the car, the person, and the horse - has its own unique way of moving. An interface could be used to define the contract requirement "You need to be able to move," but the interface doesn't define how to move.
66

77
### Parts of an Interface
88

9-
In C#, an interface is a "contract" that outlines the required properties and methods. An interface doesn't hold any data itself, but it does specify what kind of information should be provided through properties. For instance, in a "Move" interface, 'X' and 'Y' could be properties, representing location coordinates. These properties enable the retrieval or modification of their values.
9+
In C#, an interface outlines the required properties and methods. An interface doesn't hold any data itself, but it does specify what kind of information should be provided through properties. For instance, in a "Move" interface, 'X' and 'Y' could be properties, representing location coordinates. These properties enable the retrieval or modification of their values.
1010

1111
Additionally, interfaces define methods, which are actions that can be performed. However, they don't provide the implementation for these methods. For example, the "Move" interface could include a contract requiring a "Dance" method. However, what exactly happens when the "Dance" method is called by the objects that use this interface, whether it's a car, person, or horse.
1212

13-
### Using an Interface
13+
### Use an Interface
1414

15-
To utilize an interface, entities like a car, a person, or a horse from our example adopt it as part of their functionality. The car, for instance, needs to understand how to perform all the tasks listed in the interface. This process of adopting an interface by the car is known as 'implementing' the interface. In this process, the car agrees to follow the 'contract' set by the interface, defining its own unique ways to complete the tasks such as moving by "driving." Similarly, the person and the horse would also implement the interface, each defining their own unique ways to 'move' such as "run" or "gallop."
15+
To utilize an interface, entities like a car, a person, or a horse from the "move" example adopt it as part of their functionality. The car, for instance, needs to understand how to perform all the tasks listed in the interface. This process of adopting an interface by the car is known as 'implementing' the interface. In this process, the car agrees to follow the 'contract' set by the interface, defining its own unique ways to complete the tasks such as moving by "driving." Similarly, the person and the horse would also implement the interface, each defining their own unique ways to 'move' such as "run" or "gallop."
1616

1717
Consider the classes "Person" and "Horse." Both implement the "Move" interface, and it's the responsibility of "Person" and "Horse" classes to define ways to "Move."
1818

0 commit comments

Comments
 (0)