I gave the following code to generate the random string(searched it on internet).
private string RandomString(int size, bool lowerCase)
StringBuilder builder = new StringBuilder();
Random random = new Random();
for (int i = 0; i < size; i++)
ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65)));
Bt its giving the following error:
A using namespace directive can only be applied to namespaces; 'System.Text.StringBuilder' is a type not a namespace
I hav used this also: "using System.Text.StringBuilder;"
see this use this namespace
DateTimeFormatInfo DTFI = new CultureInfo("hi-IN", false).DateTimeFormat;
//here 'hi-EN' represent the Hindi-INDIA Indian culture here georgian
//calender formate ie dd/MM/yy
DTFI.DateSeparator = ":";
Label1.Text = DTFI.Calendar.ToString();
//we will ge the calender in formation
Label1.Text = DTFI.FullDateTimePattern.ToString();
//give the Date/time/year formate of that culture
I have a simple C#-(Windows-)Application. The Main-Form has two COM-Members. Working with this variables is ok, everything works as expected. When i close the application by the menu, i call Close() in the event-handler and everything is ok, but when i close by systemmenu or alt-f4 i got a com-leak. What is the reason, what is missing ?
At the end of the programm, INSIDE the COM-Component it is checked wether all references are "freed", this means if the refcounts are down to zero. The component is not only one single object, instead the library contains an object-hierarchy.
It is possible to "hook" into the event if Alt-F4 is called. Do you got a Forms-application? If yes you can register an event handler for FormClosing. Within this handler you can call the close-method for your COM.
I think you can get helpful responses to this question if you first describe what you are doing in more detail.
Since using the standard .NET WinForms OpenFileDialog is so well documented, and easy to do, what's stopping you at this point from using the same way you use a Button or anything else on the ToolBox.
Is the problem that you have some custom features in your customized OpenFileDialog that you don't know how to "move over" when you change to the standard OpenFileDialog ?
"Many : not conversant with mathematical studies, imagine that because it [the Analytical Engine] is to give results in numerical notation, its processes must consequently be arithmetical, numerical, rather than algebraical and analytical. This is an error. The engine can arrange and combine numerical quantities as if they were letters or any other general symbols; and it fact it might bring out its results in algebraical notation, were provisions made accordingly." Ada, Countess Lovelace, 1844