Skip to content

Commit 76f9152

Browse files
Merge pull request #189 from ArunKumar-SF3979/master
v30.1.37
2 parents 9feabde + 6d2b154 commit 76f9152

File tree

3 files changed

+122
-0
lines changed

3 files changed

+122
-0
lines changed

.github/workflows/dotnet.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# This workflow will build a .NET project
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
3+
4+
name: .NET
5+
6+
on:
7+
push:
8+
branches: [ "master" ]
9+
pull_request:
10+
branches: [ "master" ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: windows-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Setup .NET 8
20+
uses: actions/setup-dotnet@v4
21+
with:
22+
dotnet-version: 8.0.x
23+
- name: Setup .NET 9
24+
uses: actions/setup-dotnet@v4
25+
with:
26+
dotnet-version: 9.0.x
27+
- name: Install Maui
28+
run: dotnet workload install maui
29+
- name: Install Wasm Tools .NET 8
30+
run: dotnet workload install wasm-tools-net8
31+
- name: Install Wasm Tools .NET 9
32+
run: dotnet workload install wasm-tools
33+
- name: Build Server NET 8
34+
run: dotnet build ./Blazor-Server-Demos/Blazor_Server_Demos_NET8.csproj
35+
- name: Build Server NET 9
36+
run: dotnet build ./Blazor-Server-Demos/Blazor_Server_Demos_NET9.csproj
37+
- name: Build WebApp NET 8
38+
run: dotnet build ./Blazor-WebApp-Demos/Blazor_WebApp_Demos/Blazor_WebApp_Demos.csproj
39+
- name: Build WebApp NET 9
40+
run: dotnet build ./Blazor-WebApp-Demos/Blazor_WebApp_Demos/Blazor_WebApp_Demos_NET9.csproj
41+
- name: Build WASM NET 8
42+
run: dotnet build ./Blazor-WASM-Demos/Blazor_WASM_Demos_NET8.csproj
43+
- name: Build WASM NET 9
44+
run: dotnet build ./Blazor-WASM-Demos/Blazor_WASM_Demos_NET9.csproj
45+
- name: Build MAUI NET 8
46+
run: dotnet build ./Blazor-MAUI-Demos/Blazor_MAUI_Demos_NET8.csproj
47+
- name: Build MAUI NET 9
48+
run: dotnet build ./Blazor-MAUI-Demos/Blazor_MAUI_Demos_NET9.csproj
49+
50+
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# A tour of the C\# language
2+
3+
C\# (pronounced "See Sharp") is a modern, object\-oriented, and type\-safe programming language. C\# enables developers to build many types of secure and robust applications that run in .NET. C\# has its roots in the C family of languages and will be immediately familiar to C, C\+\+, Java, and JavaScript programmers. This tour provides an overview of the major components of the language in C\# 11 and earlier. If you want to explore the language through interactive examples, try the [introduction to C#](https://learn.microsoft.com/en-us/dotnet/csharp/tour-of-csharp/tutorials/) tutorials.
4+
5+
Several C\# features help create robust and durable applications. [Garbage collection](https://learn.microsoft.com/en-us/dotnet/standard/garbage-collection/) automatically reclaims memory occupied by unreachable unused objects. [Nullable types](https://learn.microsoft.com/en-us/dotnet/csharp/nullable-references) guard against variables that don't refer to allocated objects. [Exception handling](https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/exceptions/) provides a structured and extensible approach to error detection and recovery. [Lambda expressions](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/lambda-expressions) support functional programming techniques. [Language Integrated Query (LINQ)](https://learn.microsoft.com/en-us/dotnet/csharp/linq/) syntax creates a common pattern for working with data from any source. Language support for [asynchronous operations](https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/async/) provides syntax for building distributed systems. C\# has a [unified type system](https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/types/). All C\# types, including primitive types such as `int` and `double`, inherit from a single root `object` type. All types share a set of common operations. Values of any type can be stored, transported, and operated upon in a consistent manner. Furthermore, C\# supports both user\-defined [reference types](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/reference-types) and [value types](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/value-types). C\# allows dynamic allocation of objects and in\-line storage of lightweight structures. C\# supports generic methods and types, which provide increased type safety and performance. C\# provides iterators, which enable implementers of collection classes to define custom behaviors for client code.
6+
7+
# Hello world
8+
9+
The "Hello, World" program is traditionally used to introduce a programming language. Here it is in C\#:
10+
```
11+
using System;
12+
class Hello
13+
{
14+
static void Main()
15+
{
16+
Console.WriteLine("Hello, World");
17+
}
18+
}
19+
```
20+
21+
22+
23+
The "Hello, World" program starts with a `using` directive that references the `System` namespace. Namespaces provide a hierarchical means of organizing C\# programs and libraries. A `using` directive that references a given namespace enables unqualified use of the types that are members of that namespace. Because of the `using` directive, the program can use Console.WriteLine as shorthand for System.Console.WriteLine.
24+
25+
The Hello `class` declared by the "Hello, World" program has a single member, the method named `Main`. The `Main` method is declared with the static modifier. By convention, a static method named `Main` serves as the entry point of a C\# program.
26+
27+
The output of the program is produced by the `WriteLine` method of the `Console` class in the `System` namespace. This class is provided by the standard class libraries, which, by default, are automatically referenced by the compiler.
28+
29+
# Types and variables
30+
31+
*type* defines the structure and behavior of any data in C\#. The declaration of a type may include its members, base type, interfaces it implements, and operations permitted for that type. A *variable* is a label that refers to an instance of a specific type.
32+
33+
There are two kinds of types in C\#
34+
35+
1. Value types
36+
37+
1. Reference types.
38+
39+
## Value types
40+
41+
C\#'s value types are further divided into *simple types**enum types**struct types**nullable value types*, and *tuple value types*.
42+
|Value types|Details|
43+
|:---|:---|
44+
|[Simple types](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/value-types)|[Signed integral](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/integral-numeric-types), [unsigned integral](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/integral-numeric-types), [unicode characters](https://learn.microsoft.com/en-us/dotnet/standard/base-types/character-encoding-introduction), [IEEE binary floating-point](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/floating-point-numeric-types), [High-precision decimal floating-point](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/floating-point-numeric-types), and boolean. |
45+
|[Enum types](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/enum)|User\-defined types of the form `enum E {...}`. An `enum` type is a distinct type with named constants. Every `enum` type has an underlying type, which must be one of the eight integral types. The set of values of an `enum` type is the same as the set of values of the underlying type.|
46+
|[Struct types](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/struct)|User\-defined types of the form `struct S {...}`|
47+
|[Nullable value types](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/nullable-value-types)|Extensions of all other value types with a `null` value|
48+
|[Tuple value types](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/value-tuples)|User\-defined types of the form  `(T1, T2, ...)`|
49+
50+
51+
## Reference types
52+
|Reference types|Details|
53+
|:---|:---|
54+
|[Class types](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/class) |Ultimate base class of all other types: object. Unicode strings: string, which represents a sequence of UTF\-16 code units. User\-defined types of the form class C {...}|
55+
|[Interface types](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/interface) |User\-defined types of the form interface I {...}|
56+
|[Array types](https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/arrays/) |Single\-dimensional, multi\-dimensional, and jagged. For example: int\[], int\[,], and int\[]\[] |
57+
|[Delegate types](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/reference-types) |User\-defined types of the form delegate int D(...) |
58+
59+
60+
C\# programs use *type declarations* to create new types. A type declaration specifies the name and the members of the new type. Six of C\#'s categories of types are user\-definable: class types, struct types, interface types, enum types, delegate types, and tuple value types. You can also declare `record` types, either `record struct`, or `record class`. Record types have compiler\-synthesized members. You use records primarily for storing values, with minimal associated behavior.
61+
62+
-`class` type defines a data structure that contains data members (fields) and function members (methods, properties, and others). Class types support single inheritance and polymorphism, mechanisms whereby derived classes can extend and specialize base classes.
63+
64+
-`struct` type is similar to a class type in that it represents a structure with data members and function members. However, unlike classes, structs are value types and don't typically require heap allocation. Struct types don't support user\-specified inheritance, and all struct types implicitly inherit from type `object`.
65+
66+
- An `interface` type defines a contract as a named set of public members. A `class` or `struct` that implements an `interface` must provide implementations of the interface's members. An `interface` may inherit from multiple base interfaces, and a `class` or `struct` may implement multiple interfaces.
67+
68+
-`delegate` type represents references to methods with a particular parameter list and return type. Delegates make it possible to treat methods as entities that can be assigned to variables and passed as parameters. Delegates are analogous to function types provided by functional languages. They're also similar to the concept of function pointers found in some other languages. Unlike function pointers, delegates are object\-oriented and type\-safe.
69+
70+
You can explore more about C\# in this [tutorials](https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/tutorials/classes).

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[![.NET](https://github.com/syncfusion/blazor-samples/actions/workflows/dotnet.yml/badge.svg)](https://github.com/syncfusion/blazor-samples/actions/workflows/dotnet.yml)
2+
13
# Syncfusion® Blazor Component Examples
24

35
This repository contains the demos of [Syncfusion Blazor Components](https://www.syncfusion.com/blazor-components). This is the best place to check the controls to get more insight into the usage of APIs.

0 commit comments

Comments
 (0)