You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-1Lines changed: 19 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,7 +81,7 @@ For more detailed instructions and comprehensive information about the library,
81
81
.ToList();
82
82
```
83
83
84
-
84
+
### Get Country Data by Country Code
85
85
This example demonstrates how to retrieve a country with a specific phone code using the `GetCountryByPhoneCode` method. In this case, we're fetching the country with the phone code "+233".
The CountryData.Standard library provides a set of methods that allow you to retrieve country data, flags, regions, and phone codes. The following table lists the available methods and their descriptions.
98
+
99
+
| Method | Description |
100
+
|--------|-------------|
101
+
|[`GetCountryData()`](./docs/README.md)| Returns all country data including region, short code, and country name. |
102
+
|[`GetCountryByCode(string shortCode)`](./docs/README.md)| Returns a single country's data by its short code. |
103
+
|[`GetCountryFlag(string shortCode)`](./docs/README.md)| Gets the flag of the country, represented as an emoji, by the country's short code. |
104
+
|[`GetRegionByCountryCode(string ShortCode)`](./docs/README.md)| Selects and returns a list of regions for a particular country identified by its short code. |
105
+
|[`GetCountries()`](./docs/README.md)| Gets the list of all country names. |
106
+
|[`GetPhoneCodeByCountryShortCode(string shortCode)`](./docs/README.md)| Returns a single country's phone code by its short code. |
107
+
|[`GetCountryByPhoneCode(string phoneCode)`](./docs/README.md)| Returns country data for the country associated with the specified phone code. |
108
+
109
+
110
+
93
111
### ISO-3166-1 country codes
94
112
95
113
For a list of supported ISO-3166-1 country codes, PhoneCode, Flags, ISO and , Unicode please refer to the [Country Details](./CountryData/CountryDetails.md) file.
Copy file name to clipboardExpand all lines: docs/README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -116,14 +116,14 @@ This method is particularly useful for applications that need to display or anal
116
116
117
117
118
118
119
-
### GetCountryEmojiFlag(string shortCode)
119
+
### GetCountryFlag (string shortCode)
120
120
121
-
The `GetCountryEmojiFlag()` method is designed to fetch the flag of a specific country using its ISO 3166-1 alpha-2 code. This method provides a simple and effective way to visually represent countries in your application.
121
+
The `GetCountryFlag ()` method is designed to fetch the flag of a specific country using its ISO 3166-1 alpha-2 code. This method provides a simple and effective way to visually represent countries in your application.
122
122
123
123
Here's the method signature in C#:
124
124
125
125
```csharp
126
-
stringGetCountryEmojiFlag(stringshortCode);
126
+
stringGetCountryFlag(stringshortCode);
127
127
```
128
128
129
129
This method returns the em flag of the country corresponding to the provided ISO code. It's particularly useful when you need to display a country's flag in a user interface or in text-based communication.
0 commit comments