Horje
encode pdf file to base64 c# Code Example
encode pdf file to base64 c#
byte[] GetFileContentByName(string id)
{
    var file = Directory.GetFiles("c:\\temp", $"{id}.*").FirstOrDefault();
    if(file != null)
       return File.ReadAllBytes(file);    return null;
}
encode pdf file to base64 c#
String GetBase64FileContent(string fileName, string path)
{
	//example of path value, "c:\\temp"
	var file = Directory.GetFiles(path, $"{fileName}.*").FirstOrDefault();
	if (file != null)
	{
		Byte[] bytes = File.ReadAllBytes(file);
		String base64String = Convert.ToBase64String(bytes);
		return base64String;
	}
	return null;
}




Csharp

Related
play sound c#  Code Example play sound c# Code Example
Email Validation Regex Code Example Email Validation Regex Code Example
c# video to frames Code Example c# video to frames Code Example
scale between tow ranges c# Code Example scale between tow ranges c# Code Example
fit a picture picturbox c# Code Example fit a picture picturbox c# Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9