|
Thanks Fir that help
Sankalp Verma
|
|
|
|
|
Hi all.
Usaually when I created a method that needs to return multiple values I used ref
ie. private method(ref string A, ref string B)
{
}
I swithed over from VS2003 to VS2005 Express, I saw that you can highlight a piece of code within a method and then using refactoring extract that to a method. But if that needs to return values I saw it uses out.
ie. private method(out string A, out string B)
{
}
I just wondered if and what the difference between the two are?
Or is the out just better coding standards?
He who laughs last is a bit on the slow side
|
|
|
|
|
The difference is that if you are using out, you don't have to assign a value to the variable before calling the method.
If you are using ref it means that you are sending a value into the method also, so the variable has to have a value before you call the method, or you will get a compiling error saying that you are using a variable before assigning a value to it.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks a mill, so 90% of the time I've been using the wrong one, I usually only want to retrieve a value.
He who laughs last is a bit on the slow side
|
|
|
|
|
Using ref / out doesn't make much difference on a local machine. If you wanted to get a dataset from a remote server for instance then using out is much more efficient as you don't have to send an object over the wire to get one back.
Russ
|
|
|
|
|
HI,
I have a Application(ASP.Net with c#) that should support both SQL server 200 and Oracle 9i, but when inserting records i have a problem.
This is the table script for which iam inserting data
create table foo(
bar varchar2(10) default '1' not null
);
This is the insert statement iam executing from frontend
insert into Foo (bar) values ('')
This statement is executed properly in SQL server 2000 but its not so in Oracle. I think thats due to the default and not null constraints combined in that column.
This is the error i get when i execute in oracle
ORA-01400: cannot insert NULL into ("SCOTT"."FOO"."BAR")
Any ideas about how to solve this
Thanks in advance....
|
|
|
|
|
is there any OCX available which can be integrated with C#, which will support DVD formated movie, mpeg, avi, wmv, mov etc movies
if not is there any alternative
atleast to run DVD formated file and MPEG4 formated file
please suggest....
Thanks
Rabindra
|
|
|
|
|
The Windows Media Player control will do all of that, assuming the PC is already able to play DVDs ( which is a copyrighted codec that doesn't come with Windows, but comes with any player )
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Grid93 wrote: I Am Makeing A Online Multi-Player Game. And I Need To Construct A Message Board For It But I Need To Know How To Have It Create A New Line Every Time A User Submits A Message Like MSN...
Wow. You wrote an online multi playuer game, but you don't know how to insert a newline into a string ?
It's Environment.NewLine
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Wow You Wrote Every Word Correct Except "Playuer"
Thx Mate...
|
|
|
|
|
|
*grin* there's a surprise.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
What gave him away? Was It Perhaps The Horriffic Word Capsulation?
---
b { font-weight: normal; }
|
|
|
|
|
|
I Am Makeing A Online Multi-Player Game. And I Need To Construct A Message Board For It But I Need To Know How To Have It Create A New Line Every Time A User Submits A Message Like MSN...
Please Help
|
|
|
|
|
Please only post your questions once.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Oh, message board. Ok. Going off your subject line, I thought this was a post about one of those tables you lay down on to get a massage.
-Daniel
Typing too fast fro my owngood
|
|
|
|
|
Grid93 wrote: I Am Makeing A Online Multi-Player Game. And I Need To Construct A Message Board For It But I Need To Know How To Have It Create A New Line Every Time A User Submits A Message Like MSN...
What kind of control are you using to display the messages. If you are using a standard TextBox then you'll need to remember to set the MultiLine property to true otherwise it will only allow you to enter information on one line.
|
|
|
|
|
Yes Thankyou i have set my standard textbox to multiline...
but i cant get it to display an array of messages posted by the user(S)
|
|
|
|
|
How to log SOAP request(what is going out in request) when C# consuming a web sevice?
Thanks & Rgds
Tell Me
|
|
|
|
|
Hi,
Can any one help or direct me .
Since i'm a computer science student in the final grade i've got an idea to use C# Language to make Real Media (RM) which plays on real player play on a MP3 player is it possible or it shall need a special hardware and if it is possible please let me know can i do it
Thank You Very Much
Yours,
|
|
|
|
|
You're in your final year ? If you have a hardware mp3 player, you need to find out how ( if at all ) you can reprogram it. I doubt very much it will involve C#, C perhaps...
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I have a control that acts like control container. It looks like a table with borders, about 21px from top and 1px from bottom, left and right.
When I add a control to my control, I can place this added control anywhere, even on that 21px table header where is places control name, so that added control is above and I can see the name.
How can I set the region of that control inside this measures (21px from top and 1px from bottom, right and left) so when I set the controls inside this my control to DockStyle.Fill, so that my control borders and header with name remain visible?
I've tried with AutoScroll, but no luck.
|
|
|
|
|
I've solved it.
this.DockPadding.Top = 21;
this.DockPadding.Bottom = 1;
this.DockPadding.Left = 1;
this.DockPadding.Right = 1;
|
|
|
|
|
Hello!
I need help guys...
How can i control the vbscrollbar in a multiline textbox with 2 buttons, so that the text scrolls down and up in the same way the normal up and down keys on the scrollbars do. The 2 buttons i want to use are not in the textbox i want to place them somewhere else on my form.
so plz help me.
THx
|
|
|
|