Thank you for visiting the Rackspace Community
The Community is live! Post new content or topics so our teams can assist.

Please contact your support team if you have a question or need assistance for any Rackspace products, services, or articles.

.Net FileObject.DeleteObject() Example Error

This question is answered.

Hi,

In the FILES Object section On the .NET samples page (https://github.com/rackspace/openstack.net/wiki/Rackspace-Cloud-Files-Code-Samples) it says:

Delete Object

var cloudFilesProvider = new CloudFilesProvider(cloudIdentity);
ObjectStore deleteObjectResponse = cloudFilesProvider.DeleteObject("container name", "test.jpg");

I translated that 2nd linet into VB.NET as:
 Dim deleteObjectResponse As ObjectStore = filesProvider.DeleteObject("MDBPOREOPICS", photo.Link)

which produces the ERROR:
"Expression does not produce a value."
That error means that filesProvider.DeleteObject() is a "Sub" in VB or a void function in C.

How does one detect the results of the FILE Object's DeleteObject() function?

Thanks,
Sean
Verified Answer
All Replies