---
title: "C#.Net case-insensitive string"  
description: "C#.Net case-insensitive string"  
author: "Anonymous User"  
published: 2013-02-16  
updated: 2013-02-21  
canonical: https://www.mindstick.com/forum/609/c-sharp-dot-net-case-insensitive-string  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# C#.Net case-insensitive string

Hi [Expert](https://www.mindstick.com/articles/13120/an-expert-financial-advice-will-improve-your-finances)!

A quick and [simple](https://yourviews.mindstick.com/story/1469/5-simple-ways-to-stay-fit-amp-healthy) question...

Why does [C#.Net](https://www.mindstick.com/forum/150/how-to-check-a-uploaded-file-type-using-asp-dot-net-with-c-sharp-dot-net) allow the declaration of the [string object](https://www.mindstick.com/interview/2436/how-many-ways-we-can-create-the-string-object) to be case-insensitive?

String sHello = "Hello";\
string sHello = "Hello";\
Both the lower-case and upper-case S of the [word](https://www.mindstick.com/forum/305/read-word-file) String are acceptable and this seems to be the only object that allows this.

Can [anyone explain](https://www.mindstick.com/forum/34220/can-anyone-explain-me-about-off-page-activity) why?

## Replies

### Reply by Shankar M

Hi Chintoo,\
string and String are equivalent in C#.\
Hope the below link might help you understand\
http://en.csharp-online.net/CSharp_String_Theory%E2%80%94string_versus_String\
Regards,Shankar

### Reply by AVADHESH PATEL

Hi Chintoo!\
Read below line carefully, that remove your doubt between "[string](https://www.mindstick.com/articles/1527/string-split-in-c-sharp)" and "String" \
"string" is a language keyword while "System.String" is the type it aliases.\
Both compile to exactly the same thing, similarly:\
int is System.Int32long is System.Int64float is System.Singledouble is System.Doublechar is System.Charbyte is System.Byteshort is System.Int16ushort is System.UInt16uint is System.UInt32ulong is System.UInt64\
I think in most cases this is about code legibility - all the basic system value types have aliases, I think the lower case string might just be for consistency.


---

Original Source: https://www.mindstick.com/forum/609/c-sharp-dot-net-case-insensitive-string

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
