|
Seems like there is some information missing... Do you have any specification what the methods should do, really?
Sajjad Izadi wrote: public String insert (String st1, String st2, int len); //insert a string to an other
What is the len parameter supposed to do?
Where in one of the strings (which?) is the other supposed to be inserted?
Sajjad Izadi wrote: public int pos (String st1, String st2, int len); //return the position of specified string in an other specified string
What is the len parameter supposed to do?
Sajjad Izadi wrote: public int countOf (String st1, String st2, int len); //return number of repetitions of an string in an other string
What is the len parameter supposed to do?
Can the occurances of the string overlap, i.e. should countOf("aba", "ababa", whatever) return one or two?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi All,
I'm just looking around at getting something to perform this task on my projects and was wondering what folks here use or would recommened. If money was no object I'd like to go for Xenocode but I just can't justify $1600, another I looked at was SmartAssembly but for a £300 application they don't even provide bug fixes after purchase ... frankly I think that is outragous.
Anyway, would like to know your thoughts on this and any recommendations for things to look at would be great.
Cheers,
Jammer
Going where everyone here has gone before!
My Blog
|
|
|
|
|
All obsfucators are expensive and a waste of money.
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
Hi Christian,
Do you not take any steps to protect your codebase in applications?
Cheers,
Jammer
Going where everyone here has gone before!
My Blog
|
|
|
|
|
I accept that using C# means my code cannot be protected.
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
Gotcha.
Jammer
Going where everyone here has gone before!
My Blog
|
|
|
|
|
Considering most of the things you write have been done before, and theres probably a better and more generic example somewhere on the web, theres not much point considering protection. I don't think I've ever looked at an application and thought "I wonder how they did that?".
Even if people do think your application does something cool, they won't disassemble it, they'll be straight on here with "how to add three numbers together in dot net???? code plz!!!".
|
|
|
|
|
Hi Mark,
For sure ... I don't disagree at all.
The crazy thing for me is that whilst the application I'm working on isn't breaking any new ground at all. For a start I'm a .NET newbie (started in February '08 so I'm hardly innovator material yet! ) BUT, for the years that I've been a recording studio owner and musician I've never found an application that does what I'm doing with mine adequately. I've searched high and low over the years for a tool for this job, there are just two examples I can think of. Both developers stopped working on these two examples in 1999 and 2003. One of these examples even fails to run on WindowsXP ...
So for sure, nothing ground breakingly clever going on to get the job done, its just that there isn't anything else out there trying to do the job ...
An interesting situation for a developer in 2008 I'm sure you'll agree ...
Cheers,
Jammer
Going where everyone here has gone before!
My Blog
|
|
|
|
|
how can i make my string to char[] without using any built-in classes or prepared methods, += and = or 'foreach' in C#?
in an other expression, i want to (have to) write trim, insert, concat, countOf(char c) and etc without using any of methods or classes or foreach and even += or + in C#. how is that?
please help,
thanks.
|
|
|
|
|
Sajjad Izadi wrote: how can i make my string to char[] without using any built-in classes or prepared methods, += and = or 'foreach' in C#?
"foo".ToCharArray()
|
|
|
|
|
Is that not a built-in class or prepared method?
Forgive me, but this does sound like a school assignment.
|
|
|
|
|
yes, our professor is wanted us to write a program like that and he told us that we can get help from everyone we want. and i'm getting help from you .
|
|
|
|
|
You'll need to do some coding of your own, and then ask for specific help when you get stuck. You can't just come in here and ask for the code. that's not how it works. The forums aren't for you to get your solution done for you. And you'll find that in most of the forums available.
|
|
|
|
|
excuse me, but as i said, i haven't too use any prepared method for that.
|
|
|
|
|
Is this a school assignment?
|
|
|
|
|
If you cant use any methods on it, then the string is opaque to you, and there is no way you can do anything with it.
I think you read your assignment wrong. Try again.
|
|
|
|
|
I don't see how you can do it without =, but a string is an array of chars, and if you use a for loop instead of foreach, you can get each char by index, as in myString[0]
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
excuse me, but i haven't to use indexes, too.
|
|
|
|
|
Then I suspect your teacher is a moron. An index is the only way to get those chars out of the string.
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
So - are you meant to use telepathy? Your professor has effectively ruled out all useful constructs.
|
|
|
|
|
I usually suggest prayer when people ask stuff like this.
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
Is there a reason why you are wanting to reinvent the wheel?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
no but it's my homework and i have to write that till next two days!
|
|
|
|
|
Sajjad Izadi wrote: have to write that till next two days
Better get going then.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
I think you need to re-read the assignment. You seem to be saying 'turn a string into a byte array without using any methods on the string class that would give you access to the contents of the string'.
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|