C#-এ lowercase বা ছোট হাতের অক্ষরকে uppercase বা বড় হাতের অক্ষরে রূপান্তর করতে ToUpper() মেথডটি ব্যবহার করা হয়।
উদাহরণ
ধরুন আপনার স্ট্রিংটি হলো:
str = "david";
উপরোক্ত lowercase স্ট্রিংটি uppercase-এ রূপান্তর করতে ToUpper() মেথডটি ব্যবহার করুন:
Console.WriteLine("Converted to UpperCase : {0}", str.ToUpper());
সম্পূর্ণ কোড উদাহরণ
using System;
using System.Collections.Generic;
using System.Text;
namespace Demo
{
class MyApplication
{
static void Main(string[] args)
{
string str;
str = "david";
Console.WriteLine("LowerCase : {0}", str);
// convert to uppercase
Console.WriteLine("Converted to UpperCase : {0}", str.ToUpper());
Console.ReadLine();
}
}
}