all groups > dotnet windows forms designtime > february 2005 >
You're in the

dotnet windows forms designtime

group:

Initialisation Code - Strings with Null Values


Initialisation Code - Strings with Null Values camel NO[at]SPAM parallelsolutions.com.au
2/13/2005 4:35:13 AM
dotnet windows forms designtime:
Hi,

I have been extending the following code sample -

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnadvnet/html/vbnet08262002.asp

Somewhere along the line though, when the DataMember variable is
initialised in generated code, it's default value is null (not "" like
I thought it would be - considering the default value). Here's my
slightly updated DataMember property code :

private string vDataMember = "";
[
Category("Data"),
DefaultValue(""),
Editor("System.Windows.Forms.Design.DataMemberListEditor,System.Design",
typeof(System.Drawing.Design.UITypeEditor))
]
public string DataMember
{
get { return(vDataMember); }
set
{
vDataMember = value;

SetSource();
if ( vAutoDiscover )
DoAutoDiscover();
DataBind();
}
} /* DataMember */

Can anybody provide me with some insights?

Regards,

Re: Initialisation Code - Strings with Null Values joeycalisay
2/14/2005 5:29:12 PM
[quoted text, click to view]

Are you sure that you are setting the string vDataMember field to an empty
string initially? Mr. Loftka's example does not, perhaps you forgot to
initialize it to an empty string contrary to your posted message.

--
Joey Calisay
http://spaces.msn.com/members/joeycalisay/


[quoted text, click to view]

AddThis Social Bookmark Button