|
You can hardly find any book that will cover almost everything. MSDN Library is the best place to start.
|
|
|
|
|
"Everything C#", is MSDN.
If you want something else, then you're going to have to put up with stuff being left out.
|
|
|
|
|
The Nutshell[^] book(s). Accept no substitute!
/ravi
|
|
|
|
|
is it possible to use an XML file with all XML assemblies but with an XML which has a different file extension? so it's actually an XML file but it has .ext extension?
|
|
|
|
|
It depends upon what you mean by "use", but you can read any file containing XML as XML, no matter what the extension of the file actually is.
Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter.
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
|
|
|
|
|
|
It depends on what you want it to do based on the extension. I use XML to save configuration info in files and give the file a different extension so they are easy to identify, etc. The file extension and the contents are independent of each other.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
I want to know how can I check if the clipboard has a URL or not? basically I have a txtURL textbox on my form and I want if they user went to any browser or word editor to copy a URL from there then came back o the same form it should display a MessageBox saying dio you want to copy the URL in the textbox?
|
|
|
|
|
Yeah, just check if the text in the clipboard is a valid URL. I don't believe there is a specific format for URL's when copied to the clipboard (i.e., they will just be copied as text). Actually, the way the clipboard works is that items can be copied to the clipboard in their various formats. So, the URL might exist as both text and as, say, HTML in the clipboard. If you really want to know, give it a try... handle some event that inspects the clipboard and see what formats are in it, then see what data is contained in each format.
|
|
|
|
|
Get the text from the Clipboard using the GetText method then match it against a URL regular expression.
Eslam Afifi
|
|
|
|
|
Hi,
I have a function like foo(ref System.Windows.Form objForm) and I need to pass a custom form which is derived from System.Windows.Form that is
Custom form :- FormX : System.Windows.Form
So, my question is how can I call function foo with object of FormX as ref argument that is something like
FormX obj;
foo (ref obj); // it is giving compilation error
Please let me know the solution
Regards,
Pankaj Sachdeva
There is no future lies in any job but future lies in the person who holds the job
|
|
|
|
|
You haven't stated the error but I guess it's because you haven't assigned obj to either null or a FormX instance.
When passing by reference the object is passed into the function so it must exist (or be assignd null if a reference type).
If you want the function to pass out the FormX instance and not provide it to the method yourself, you should use out instead of ref .
By the way, unless you've messed with the System.Windows namespace, it should be System.Windows.Forms.Form .
Dave
Binging is like googling, it just feels dirtier. (Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Pass-by-reference parameters must match type exactly. The workaround is
to do:
FormX objX = new FormX();
Form obj = objX;
foo(ref obj);
However, since FormX is a reference type, your foo method doesn't even need the ref parameter keyword. c# passes it as a reference by default.
foo(System.Windows.Forms.Form obj)
{
}
|
|
|
|
|
Member 2463256 wrote: However, since FormX is a reference type, your foo method doesn't even need the ref parameter keyword. c# passes it as a reference by default.
Not quite the same thing. The difference is this:
foo(ref Form obj)
{
obj = new Form();
}
foo(Form obj)
{
obj = new Form();
}
The "ref" keyword is similar to the "out" keyword, except that "out" only works in one direction, while "ref" both provides a value and allows it to be changed.
Of course, in either case, using "ref" or not, changing a property of 'obj' will affect the caller's instance.
|
|
|
|
|
Ian Shlasko wrote: except that "out" only works in one direction, while "ref" both provides a value and allows it to be changed.
Not quite. The only difference between ref and out is that out ensures the value will be set before you return from the method. When ref is used, it does not ensure the variable will be set... it merely allows it. This allows for one to do something like this:
Form myForm;
SomeMethod(out myForm);
myForm.ShowDialog();
Notice how this differs from ref:
Form myForm;
SomeMethod(ref myForm);
myForm.ShowDialog();
|
|
|
|
|
Well, your example illustrates the inverse, but still, I stand corrected. Forgot about the requirement that "out" variables are set.
But basically...
Normal: Values in, unmodified (Aside from setters/methods of object types)
Ref: Values in, possibly different values out
Out: Nothing in, values out
|
|
|
|
|
Thank you everybody but in my case Member 2463256 reply was useful. Problem resolved!
Regards,
Pankaj Sachdeva
There is no future lies in any job but future lies in the person who holds the job
|
|
|
|
|
Dear all,
Is there a way to build an application that would be able to integrate itself with orkut?
I am trying do accomplish it but no success.
I am not able to login to orkut from my application.
Best regards,
Marco Alves.
|
|
|
|
|
|
Would I be able to read profile data, notes, etc using this API?
|
|
|
|
|
Stop asking and RTFM !!!
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
What is a RTFM, can you post some sample codz plz
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Apparently this[^]
DaveIf this helped, please vote & accept answer!
Binging is like googling, it just feels dirtier. (Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
|
|
|
|
|
System.Diagnostics.Process.Start("C:\\Program Files (x86)\\Combined Community Codec Pack\\MPC\\mpc-hc.exe","C:\\Users\\xxx\\Documents\\Visual Studio 2008\\Projects\\aa\\aa\\bin\\last.mpcpl");
I get MPC-HC Opened, but in playlist i see: VISUAL and STUDIO.
Right click on VISUAL i get C:\\Users\\xxx\\Documents\\Visual, right click on STUDIO i get STUDIO. So something is wrong with passing argument. Probably he read it without " ".
I tried a lot of things, got any idea?
modified on Tuesday, March 23, 2010 2:10 PM
|
|
|
|
|
Have you tried putting the argument in literal quotes?
"\"C:\\Users\\xxx\\Documents\\Visual Studio 2008\\Projects\\etc etc etc\""
If that doesn't work, you can try converting it to the short path name (ex. "C:\Progra~1\")... Found a link with some code for that here[^]. Try adding the quotes first though.
|
|
|
|