I was given a task to convert binary data to file using c# and I am converting that using
Convert binary data to a pdf file
but a question came to my mind that how can we detect that what extension of file it is? Because in our database there is no column for extension.
Please give your suggestion?