First, learn Java.
Second, learn C#.
Then translate the one to the other.
We are not here to do your work for you. And since you are clearly trying to get by without thinking for yourself - your other questions are clear evidence of that - I for one am not prepared to do any more for you. Pull your finger out, learn your subject(s) and start thinking.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
The best way to translate this is for you to sit down and work out what this code is currently doing. Once you know what this is doing, it becomes a lot easier to translate it into a different language.
It was always a weird way to do it, certainly took me a minute more time to read than it should. This is particularly offensive since it has a side-effect in code that pretends to be all "pure" and "elegant" and "look at me I'm using enumerables I'm so hip".
What it really does is make a string from _len random characters from _chars, so just implement that however makes the most sense. Which in Java is probably this:
char temp = new char[_len];
for (int i = 0; i < temp.length; i++)
temp[i] = _chars[_rnd.nextInt(_chars.length)];
String _pass = String.valueOf(temp);
1.- When I use the Visual Studio debugger, if the form is large I can not see the code below. How to hide the form?
2.- I have read that I can stop the execution in the debugger (F9) and that I can press Interrupt, Modify a line and Continue. But he will not let me interrupt. How is made? Because now I have to stop the execution and start again.
If you have two monitors, which you should, then drag the form into one monitor and observe the debugging in the other monitor(the one with the VS IDE running). This works for most forms and website debugging.
I have never needed to interrupt a debugging session....ever. Not to say that someone out there doesn't need to do this. I just isolate the code that needs to be debugged, and set breakpoints there, or start from the beginning of the code path, if I need to broaden my scope.
What I do is set a breakpoint close to where the action that I want to observe is going to take place and then run the application. use F10 to advance line by line, and F11 to step into methods. If you need to observe a collection or object variable then just right click on the variable and select Quick Watch...
Go to Youtube and search for .net VS debugging tips and how to videos, if you think that would help you learn more about this.
Edit: You can also use "Run to cursor" if you want to skip sections of code and not have to debug the code line by line. Just place your cursor somewhere further in the code path, and then right click and select run to cursor. I use this a lot to jump over loops or to skip larger areas of code that I don't need to see.
You can also drag the yellow arrow on the left side of the code viewer to a desired code path that has already executed, and repeat "most" code execution again, if needed. This is not good for all scenarios because variables and values can change during the first pass of the code execution. I use this sometimes when debugging Unit Tests, and I want to run the test again without stepping out of the debugger instance.
Also, look into conditional expressions when debugging as well - where applicable.
But what I have asked is that I have read that you can press F9 and for debugging. Then "Interrupt" is pressed, the line of code is modified and "Continue" is pressed. However "Interrupt" is disabled. That's why I have to stop and restart every time and so for years.
On the other hand, to see the hidden code below the form, do I need two monitors? Then it does not serve me because it is not practical and it would be easier an option, which does not exist, to hide the form.
I stay as I was uninformed.
Thanks for your effort, does anyone have more information? I am finding many bugs to Microsoft with so many years, so many resources and so many smart people. A little comment. In the latest version of "Visual Studio" the only difference is that it is called 2015, the rest is the same.
And if you read my blog about Windows 10 you'd be surprised at the number of glitches, apart from being a spyware program in its entirety.
Congratulations to all of you. I have taken note of a great sentence that I have been given:
"It is a question of being in the right place and at the right time to do what is right."
It's not really clear if you know this, but F9 doesn't stop the code from running. It sets a breakpoint on the line the cursor is on in the code editor. When execution gets to that line the code stops running at that point. That's when you can inspect variable contents, stack trace, and see what's going on.
I checked what they told me about the configuration in "Tools", everything is correct but "Interrupt" is disabled and I can not edit and continue. As long as I have a while I will look at the link that passed me this fellow. Thank you
I have many functions that employ some global variables that are common to all such functions, such as the language variable, to display error messages in the proper language.
I want to make various compiled dlls which in turn employs those functions. If those variables are in a global structure, when I create a main that uses the dll, in the main i have to define that structure or include the same .cs and, in that way, there are two different copies of that structure with the same name. That produces the error CS0433.
I can define a structure in the dll and in the Main I can use it, making a copy of the Main variables to the dll structure. But then if on the Main changes one of the variables, The dll does not have the updated value, I have to do it with every dll I use. Now you think the problem is bigger if there is more than one dll. That is impractical.
Most unlikely since what you are trying to do does not make sense. As I told you before in your original question, you need to rethink your design. If a DLL requires special parameters supplied by the main program then you need to add a method to the DLL to receive those parameters and use them to produce whatever customised results are required. There is no reason why you should ever require two versions of the same source module or structure to make this work.
I'm already rethinking my design, what I do not know is how to do it. This matter is not well finished technically.
Focusing and exposing this topic is difficult.
1.- I have some functions in .cs files that I use in both Main and functions .cs and DLLs. These functions use a structure with some variables of general use. In order to compile those functions for the Main or if I want to create a dll, the structure must exist for functions such as in a .cs file. Imagine that in the cs the structure is called Name_Common.Cls_Common.StCommon
2.- When using Main, I need to add the definition of that structure of the same .cs That already produces the mentioned error of ambiguity. But if I want with an alias to refer to the structure of the dlls, I have to enter the variables every time from Main in each structure of each dll, being in Main with alias: using Name_Common_Main = Dll.Name_Common for the first dll. But, and for the second dll? I can not add another using or if? And those variables, when they are not global, when they change their value will not be updated.
I'm stuck, mentally and by software. How do people do?
One of the first questions you need to ask is whether you actually need a DLL in the first place. Will this DLL be used by other applications, or is it specific only to this one? If the latter, then you probably do not need to separate out the methods it provides.
As to the rest, I still cannot quite grasp what it is that you are trying to achieve. Using a structure to pass data between classes or methods does not need to be over complicated. It is just a matter of providing all the right information in the right place at the right time. As to variables changing during the lifecycle of an application, this can easily be captured by the use of events and delegates.
Aha, I'll take note.
Point number 1, what do I need it for... Already, written !!
Item Number 2, it is a question of being at the right time and in the right place to do what is right... It's already written !!
Hi, thanks for replying. I already looked for the past couple of days, I did not find any that talked about all three concepts (Dependency Injection, Repository and Unit of Work, and Mock) in the same tutorial.
I have seen tutorials on unit testing MVC controller methods but they were lacking what I'm looking for. None of them were using Dependency Injection or Mocking.
I'm kinda confused as to exactly what you are trying to achieve - and the text description doesn't match the code test strings at all, which doesn't help. And that code doesn't make a lot of sense either...
So take a deep breath, and show us a single sample input string and the output you expect to get from it. When we understand exactly what you are trying to do, we can probably help you - but at the moment I'm really confused about what you are trying to get as a result and can't solve this for you.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...