string s = "Added on Monday, December 20, 2021 2:19:21 PM"; int count = note.Location.Count( x => x == ',' );Output:
2
Microsoft AX 2012, X++, C#, SQL server, SSRS, Java, JavaFX, Oracle, PL/SQL, Delphi - codes examples, step-by-step tutorials, experiences.
string s = "Added on Monday, December 20, 2021 2:19:21 PM"; int count = note.Location.Count( x => x == ',' );Output:
2
private Listnotes = new List (); ... List uniqueBooks = new List (); uniqueBooks = notes.GroupBy( x => x.BookName ).Select( g => new Note { BookName = g.Key } ).ToList(); uniqueBooks.Sort( (x, y ) => x.BookName.CompareTo( y.BookName ) );
DateTime dt;
bool b = DateTime.TryParseExact( "December 20, 2021", "MMMM d, yyyy",
new System.Globalization.CultureInfo("en-US"),
DateTimeStyles.None, out dt );
if ( b ) Console.WriteLine( dt.Year );
Output:
2021if you have some problem with conversion, try reversal order at first for checking (=>compare if your string is same as output here):
Console.WriteLine( DateTime.Now.ToString( "MMMM d, yyyy", new System.Globalization.CultureInfo("en-US") ) );
info( "xxx" ) -> info( 'xxx' );The solution for this warning:
warning( strFmt( "@cieb:cieb4", _sParamName ) );shows this warning (in label is this value "Attention - parameter %1 not found."): BP Rule: [BPUnusedStrFmtArgument]:The placeholder '%1' to strFmt is not used in the format string.
warning( strFmt( literalStr("@cieb:cieb4"), _sParamName ) );