Click here to Skip to main content
15,899,679 members
Home / Discussions / C#
   

C#

 
GeneralRe: .Net framework Pin
Furty3-Aug-03 20:41
Furty3-Aug-03 20:41 
GeneralDataBinding to a DataGrid Pin
betengan3-Aug-03 6:23
betengan3-Aug-03 6:23 
GeneralRe: DataBinding to a DataGrid Pin
Not Active3-Aug-03 11:12
mentorNot Active3-Aug-03 11:12 
GeneralRe: DataBinding to a DataGrid Pin
betengan4-Aug-03 5:38
betengan4-Aug-03 5:38 
GeneralGlobal Variables ...wtf Pin
antoine@orchus-tech3-Aug-03 3:28
antoine@orchus-tech3-Aug-03 3:28 
GeneralRe: Global Variables ...wtf Pin
S O S3-Aug-03 4:47
S O S3-Aug-03 4:47 
GeneralRe: Global Variables ...wtf Pin
Marc Clifton3-Aug-03 6:30
mvaMarc Clifton3-Aug-03 6:30 
GeneralRe: Global Variables ...wtf Pin
Furty3-Aug-03 14:36
Furty3-Aug-03 14:36 
Orlanda Ramos wrote:
Now, pray tell, what is the best, non-obstrusive way
of doing that without creating ugly dependencies between
those two?


As pssing properties in the constructor could be perceived as creating a dependency, the other way to do this would be to provide public or internal accessors for the properties you want to pass in form 2.

public class Form2 : Form<br />
{<br />
private int myInt;<br />
private string myString;<br />
<br />
public int MyInt { set { myInt = value; } }<br />
public string MyString { set { myString = value; } }<br />
<br />
public Form2()<br />
{<br />
}<br />
}


public class Form1 : Form<br />
{<br />
public Form1()<br />
{<br />
}<br />
<br />
private void OpenForm2(int myInt, string myString)<br />
{<br />
Form2 form2 = new Form2();<br />
form2.MyInt = myInt;<br />
form2.MyString = myString;<br />
form2.Show();<br />
}<br />
}

GeneralRe: Global Variables ...wtf Pin
James T. Johnson3-Aug-03 16:20
James T. Johnson3-Aug-03 16:20 
GeneralRe: Global Variables ...wtf Pin
antoine@orchus-tech4-Aug-03 16:35
antoine@orchus-tech4-Aug-03 16:35 
GeneralRe: Global Variables ...wtf Pin
LovelyXiaoXinXin3-Aug-03 16:46
LovelyXiaoXinXin3-Aug-03 16:46 
GeneralRe: Global Variables ...wtf Pin
Furty3-Aug-03 17:19
Furty3-Aug-03 17:19 
GeneralModifying window without activating Pin
S O S3-Aug-03 2:26
S O S3-Aug-03 2:26 
GeneralTopmost windows Pin
S O S3-Aug-03 1:02
S O S3-Aug-03 1:02 
GeneralRe: Topmost windows Pin
LovelyXiaoXinXin3-Aug-03 3:02
LovelyXiaoXinXin3-Aug-03 3:02 
GeneralRe: Topmost windows Pin
S O S3-Aug-03 3:25
S O S3-Aug-03 3:25 
GeneralLock problem Pin
Meysam Mahfouzi2-Aug-03 23:03
Meysam Mahfouzi2-Aug-03 23:03 
GeneralRe: Lock problem Pin
Arjan Einbu3-Aug-03 4:32
Arjan Einbu3-Aug-03 4:32 
GeneralRe: Lock problem Pin
Meysam Mahfouzi3-Aug-03 16:42
Meysam Mahfouzi3-Aug-03 16:42 
GeneralRe: Lock problem Pin
James T. Johnson3-Aug-03 16:43
James T. Johnson3-Aug-03 16:43 
GeneralRe: Lock problem Pin
Meysam Mahfouzi3-Aug-03 16:54
Meysam Mahfouzi3-Aug-03 16:54 
GeneralRe: Lock problem Pin
James T. Johnson3-Aug-03 17:01
James T. Johnson3-Aug-03 17:01 
QuestionHow do I supress the Expect: 100-continue header from being sent with a HttpWebRequest Post? Pin
Furty2-Aug-03 19:43
Furty2-Aug-03 19:43 
GeneralRead and write in .INF file Pin
Hoang Dung2-Aug-03 16:59
Hoang Dung2-Aug-03 16:59 
GeneralRe: Read and write in .INF file Pin
Furty3-Aug-03 17:41
Furty3-Aug-03 17:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.