c# - Pass the file name of a saved file from one class to another -
i'll best explain.
my program takes screen shots user can save desktop or pass media server.
however, pass server first must have file location of image saving , must first save file using save file dialog , store location of in string triggers bool image has been save. code looks pass file server:
// sfd safe file dialog uploadtoserver.httpuploadfile(settings.default.serveraddress , sfd.filename.tostring(), "file", "image/jpeg", nvc);
i tried store sfd in following way pass call class:
public string saveimagelocation { { return sfd.filename.tostring(); } set { sfd.filename.tostring() = value; } }
but following error:
error 1 left-hand side of assignment must variable, property or indexer
what i'm trying achieve take file upload code , move class. can me error?
this method/function (call).
tostring()
you cannot assign method/function (call) value..
.tostring() = value;
try
public string saveimagelocation { { return sfd.filename.tostring(); } set { sfd.filename = value; } }
please note have not indicated type filename
is, still may not work.
Comments
Post a Comment