Hey all I have made the following class:
public class ssrsFormats
public static readonly string
pdf = "PDF",
mhtml = "MHTML",
html4 = "HTML4.0",
html3 = "HTML3.2",
excel1 = "EXCELOPENXML",
excel2 = "EXCEL",
word1 = "WORDOPENXML",
word2 = "WORD",
csv = "CSV",
xml = "XML",
image = "IMAGE";
And what I am wondering is how (if) I can do something like so:
I only want to do this so I have a type of **"intellisense"** in order to help me build the function call when it comes to that.
Instead of me trying to remember the image formats within the SSRS formats class, I start typing **ssrsformats.image.** and it pops up the image formats for me to pick from.
I am trying to also do this **within one class** instead of having multiple classes that point to other classes.
You can create two enums, one for your main format type and a second for your image type. Or you can add a reference to System.Drawing and use the built in image formats via System.Drawing.Imaging.ImageFormat
Below is a sample class using enums instead of your static ssrsFormats: