Chandu yadav

Chandu yadav

810 Articles Published

Articles by Chandu yadav

Page 14 of 81

Bootstrap Filter list

Chandu yadav
Chandu yadav
Updated on 11-Mar-2026 3K+ Views

To create a filter list, use the .list-group class in Bootstrap.You can try to run the following code to create a filter list −Example           Bootstrap Example                                          Tutorials                                           Java             jQuery             PHP             AngularJS             Ruby             C                                $(document).ready(function(){             $("#demo").on("keyup", function() {                var value = $(this).val().toLowerCase();                $("#newList li").filter(function() {                   $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)                });             });          });          

Read More

Set 6-item tuple in C#’

Chandu yadav
Chandu yadav
Updated on 11-Mar-2026 132 Views

With C#, you can easily set a 6-item tuple.The following is a 6-item tuple −var myTuple = new Tuple("electronics", new string[] { "shoes", "clothing#", "accessories" }, 100, 250, 500, 1000);above, we have tuple for string, string array and int as shown below −TupleHere is the complete code −Exampleusing System; class Demo {    static void Main() {       var myTuple = new Tuple("electronics",       new string[] { "shoes", "clothing#", "accessories" },       100,       250,       500,       1000);       // Displaying Item 1       Console.WriteLine(myTuple.Item1);       // Displaying Item 5       Console.WriteLine(myTuple.Item5);       // Displaying Item 6       Console.WriteLine(myTuple.Item6);    } }Outputelectronics 500 1000

Read More

What does the @ prefix do on string literals in C#?

Chandu yadav
Chandu yadav
Updated on 11-Mar-2026 819 Views

The @prefix states hat you don't need to escape special characters in the string following to the symbol.The following statement@"D:ew"is equal to:"D:ew"The @ prefix is also used if you want to have large strings and want it to be displayed across multiple lines. The following is an example showing multi-line string −Exampleusing System; namespace Demo {    class Program {       static void Main(string[] args) {          string str = @"Welcome User,          Kindly wait for the image to          load";          Console.WriteLine(str);       }    } }OutputWelcome User, Kindly wait for the image to load

Read More

C# program to get the file name in C#

Chandu yadav
Chandu yadav
Updated on 11-Mar-2026 700 Views

Set the path name in a string −string myPath = "D:ew\quiz.txt";Now, use the GetFileName() method to get the name of the file −Path.GetFileName(myPath)The following is the complete code −Exampleusing System; using System.IO; namespace Demo {    class Program {       static void Main(string[] args) {          string myPath = "D:ew\quiz.txt";          // get extension          Console.WriteLine("Extension: "+Path.GetExtension(myPath));          // get path          Console.WriteLine("File Path: "+Path.GetFileName(myPath));       }    } }OutputExtension: .txt File Path: D:ew\quiz.txt

Read More

Add a red background color to an element to set danger action with Bootstrap

Chandu yadav
Chandu yadav
Updated on 11-Mar-2026 348 Views

Use the .btn-danger class to set danger action for a button i.e. red background color to an element.You can try to run the following code to implement danger action −Example           Bootstrap Example                                          Categories                      Tech 95          Entertainment 30          Research 9          Viral 20          Sport 105                      Do not click below:          Danger          

Read More

Bootstrap table-responsive class

Chandu yadav
Chandu yadav
Updated on 11-Mar-2026 2K+ Views

Wrapping any .table in .table-responsive class, you will make the table scroll horizontally up to small devices (under 768px). When viewing on anything larger than 768px wide, you will not see any difference in these tables.To make a responsive table, you can try to run the following code −Example           Bootstrap Table                                                                                         Subject                   Marks                   Student                                                                  Programming                90                Amit                                        Web Dev                92                Yuvraj                                        Science                95                Sachin                                        Economics                80                Tony                                

Read More

What does Array.IsFixedSize property of array class do in C# ?

Chandu yadav
Chandu yadav
Updated on 11-Mar-2026 334 Views

The IsFixedSize property of ArrayList class is used to get a value indicating whether the ArrayList has a fixed size.The following is an example stating the usage of isFixedSize property −Exampleusing System; using System.Collections; class Demo {    public static void Main() {       ArrayList arrList = new ArrayList();       Console.WriteLine("Adding some numbers:");       arrList.Add(45);       arrList.Add(78);       Console.WriteLine(arrList.Count);       Console.WriteLine("myArrayList.IsFixedSize = " + arrList.IsFixedSize);     } }OutputAdding some numbers: 2 myArrayList.IsFixedSize = FalseAbove we have added an array list −ArrayList arrList = new ArrayList();Then we have checked whether it has a fixed size or not −Console.WriteLine("myArrayList.IsFixedSize = " + arrList.IsFixedSize);

Read More

C# int.Parse Vs int.TryParse Method

Chandu yadav
Chandu yadav
Updated on 11-Mar-2026 6K+ Views

Convert a string representation of number to an integer, using the int.TryParse and intParse method in C#.If the string cannot be converted, then the int.TryParse method returns false i.e. a Boolean value, whereas int.Parse returns an exception.Let us see an example of int.Parse method −Exampleusing System.IO; using System; class Program {    static void Main() {       int res;       string myStr = "120";       res = int.Parse(myStr);       Console.WriteLine("String is a numeric representation: "+res);    } }OutputString is a numeric representation: 120Let us see an example of int.TryParse method.Exampleusing System.IO; using ...

Read More

Different ways of Reading a file in C#

Chandu yadav
Chandu yadav
Updated on 11-Mar-2026 323 Views

Here, we are reading two different files −Reading text file −Exampleusing System; using System.IO; namespace FileApplication {    class Program {       static void Main(string[] args) {          try {             using (StreamReader sr = new StreamReader("d:/new.txt")) {                string line;                // Read and display lines from the file until                // the end of the file is reached.                while ((line = ...

Read More

Bootstrap .btn-xs class

Chandu yadav
Chandu yadav
Updated on 11-Mar-2026 839 Views

To create extra small buttons, use the .btn-xs class.You can try to run the following code to implement btn-xs class in Bootstrap −Example           Bootstrap Example                                       The following are extra small buttons:                Extra small Primary button                      Extra small button          

Read More
Showing 131–140 of 810 articles
« Prev 1 12 13 14 15 16 81 Next »
Advertisements