Convert String To camelCase from TitleCase C#

后端 未结 11 1493

I have a string that I converted to a TextInfo.ToTitleCase and removed the underscores and joined the string together. Now I need to change the first and only the first charact

11条回答
  •  北恋
    北恋 (楼主)
    2021-02-04 23:34

    var camelCaseFormatter = new JsonSerializerSettings();
    camelCaseFormatter.ContractResolver = new CamelCasePropertyNamesContractResolver();
    
    JsonConvert.SerializeObject(object, camelCaseFormatter));
    

提交回复
热议问题