Hi guys ,I have written a program which filter the text using replace function.What i want to do is to create another class and do all the filtering over there .How can i achieve this.I am pretty new to C# so any help would be appreciated.
Thanks
sadhawan 0 Light Poster
Recommended Answers
Jump to PostWhy don't you use a method instead of a class?
Add this above public Form1() { ...
string FilterText(string text) { // do all the filtering here }
And you can use it like this:
…string text = "Hello, World."; text = FilterText(text);
Jump to PostPosted above is not a class, instead he has suggested you use a method which is called by simply:
text = FilterText(text);
(as it says in his post)Note that a method comes inside a class, e.g.
Class Program { static void Main() { string text …
All 7 Replies
farooqaaa 48 Enthusiast
Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster
sadhawan 0 Light Poster
Lusiphur 185 Practically a Posting Shark Team Colleague Featured Poster
Medalgod 7 Light Poster
sadhawan 0 Light Poster
Medalgod 7 Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.