---
title: "The Difference Between String and string in C - CloudBlast"
description: "The Difference Between String and string in C"
url: "https://cloudblast.io/ja/article/The-Difference-Between-String-and-string-in-C"
language: "ja-JP"
---

ブログ

# The Difference Between String and string in C

登録で5€の無料残高がもらえる

CloudBlastに登録して、VPSをデプロイするための5€分のクラウドクレジットを獲得しましょう

[無料の5€を受け取る](https://console.cloudblast.io/auth/login?ref=2)

-   [戻る](https://cloudblast.io/ja)
-   [すべての記事](https://cloudblast.io/ja/blog)

2024-09-27

### The Difference Between String and string in C

tutorials

In C#, developers often encounter both `String` and `string` when working with text data. While they appear similar, understanding the distinction between them is important for writing clear and effective C# code.

**String (with a Capital 'S')**

The term `String` with a capital 'S' refers to the `System.String` class in the .NET framework. This class provides a wide range of methods and properties for manipulating strings, such as comparing, concatenating, and formatting text. It is part of the `System` namespace, which is why its fully qualified name is `System.String`\[\[5\]\].

**string (with a Lowercase 's')**

On the other hand, `string` with a lowercase 's' is a C# keyword that serves as an alias for `System.String`. This means that `string` and `System.String` are interchangeable in C# code. The use of `string` is more common in C# programming because it aligns with the language's convention of using lowercase keywords\[\[5\]\].

**Interchangeability and Usage**

Since `string` is an alias for `System.String`, both can be used interchangeably without any difference in functionality. For example, the following two declarations are equivalent:

> string greeting = "Hello, World!";
> String greeting = "Hello, World!";

Both lines of code declare a string variable named `greeting` and initialize it with the same text. The choice between using `string` or `String` often comes down to personal or team coding style preferences.

**Conclusion: Consistency in Code**

In conclusion, there is no functional difference between `String` and `string` in C#. They both refer to the same class in the .NET framework. However, using `string` is generally preferred in C# for consistency with other language keywords. Understanding this distinction helps maintain clarity and uniformity in your codebase.

シェア

## 続きを読む

[2026-07-25 How to Install and Set Up Mailcow on Ubuntu and Debian VPS tutorials](https://cloudblast.io/article/how-to-install-and-setup-mailcow-on-ubuntu-and-debian-vps)

[2026-07-25 How to Install Chatwoot on the Latest Ubuntu and Debian Server tutorials](https://cloudblast.io/article/how-to-install-chatwoot-on-ubuntu-and-debian-server)

[2026-07-25 How to Install Mattermost on the Latest Ubuntu and Debian Server tutorials](https://cloudblast.io/article/how-to-install-mattermost-on-ubuntu-and-debian-server)

[2026-07-25 How to Install RustDesk on the Latest Ubuntu and Debian Server tutorials](https://cloudblast.io/article/how-to-install-rustdesk-on-ubuntu-and-debian-server)
