GetFileType.cs 492 B

12345678910111213141516171819202122232425
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace TEAMModelOS.SDK.Context.Constant.Common
  5. {
  6. public class GetFileType
  7. {
  8. //private
  9. public GetFileType() {
  10. }
  11. public string GetExtension(string fileName) {
  12. return fileName.Substring(fileName.LastIndexOf(".") + 1, (fileName.Length - fileName.LastIndexOf(".") - 1)); //扩展名
  13. }
  14. public string GetType(string fileName) {
  15. string extension = GetExtension(fileName);
  16. return null;
  17. }
  18. }
  19. }