Listing Objects
![](https://support.huaweicloud.com/intl/en-us/sdk-dotnet-devg-obs/public_sys-resources/notice_3.0-en-us.png)
If you have any questions during the development, post them on the Issues page of GitHub. For details about parameters and usage of each API, see the API Reference.
After objects are uploaded, you may want to view the objects contained in a bucket. Sample code is as follows:
ListObjectsRequest request = new ListObjectsRequest(); request.BucketName = "bucketname"; ListObjectsResponse response = client.ListObjects(request); foreach (ObsObject Object in response.ObsObjects) { Console.WriteLine("ObjectKey={0}, Size={1}", Object.ObjectKey, Object.Size); }
![](https://support.huaweicloud.com/intl/en-us/sdk-dotnet-devg-obs/public_sys-resources/note_3.0-en-us.png)
- You can call ListObjectsResponse.ObsObjects to obtain the descriptions of all objects.
- In the previous sample code, 1000 objects will be listed, by default.
- For more information, see Listing Objects.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot