29 lines
624 B
C#
29 lines
624 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Palindrom
|
|
{
|
|
internal class IsPalindrom
|
|
{
|
|
private string _text;
|
|
public bool IstDasEinPalindrom(string text)
|
|
{
|
|
this._text = text.ToLower();
|
|
this._text = text.Replace(" ", "");
|
|
|
|
for (int i = text.Length - 1; i < 0; i--)
|
|
{
|
|
this._text.Append(text[i]);
|
|
}
|
|
if (this._text == text)
|
|
{
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
}
|
|
}
|