Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Csharp Articles
Found 1,951 articles
Upgraded to SAP.net connector 3.0 is not working in Visual Studio 2008 and 2010
Note that SAP.NET Connector 3.0 doesn’t work similar to the 2.0 connector. There are many significant changes − both improvements and modifications − provided in the .NET 3.0 version. SAP.NET Connector 3.0 Overview SAP .NET Connector 3.0 is the current version of SAP's development environment for communication between the Microsoft .NET platform and SAP systems. With the use of SAP.NET connector, you can connect SAP system to all common programming languages like Visual Basic.NET, C#, or Managed C++ and many more. This is the official SAP documentation link about general capabilities of SAP.NET connector − ...
Read MoreExisting RFC to load table data, and to get list of tables and list of BAPI’s in SAP
I am not sure that there exists a BAPI to see list of all BAPI's in SAP system. You can use the Function module RFC_FUNCTION_SEARCH to search for function modules starting with BAPI*. Getting List of BAPIs You can call Function Module BAPI_MONITOR_GETLIST to get list of all available BAPI's. This function module provides comprehensive information about Business Application Programming Interfaces available in your SAP system − CALL FUNCTION 'BAPI_MONITOR_GETLIST' EXPORTING OBJECTTYPE = p_ojtpe SHOW_RELEASE = ...
Read MoreInfinity or Exception in C# when divide by 0?
Divide by zero is the System.DivideByZeroException, which is a class that handles errors generated from dividing a dividend with zero.Let us see an example.Exampleresult = num1 / num2;Above, if num2 is set to 0, then the DivideByZeroException is caught since we have handled exception.
Read MoreC# Program to convert Digits to Words
Firstly, declare the words from 0 to 9 −// words for every digits from 0 to 9 string[] digits_words = { "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine" };The following are the digits to be converted to words −// number to be converted into words val = 4677; Console.WriteLine("Number: " + val);Use the loop to check for every digit in the given number and convert into words −do { next = val % 10; a[num_digits] = next; num_digits++; val = val / 10; } while(val > 0);ExampleYou can try to ...
Read MoreC# Program to Convert Decimal to Binary\\n
Let’ s say you have set the decimal to be −decVal = 34; Console.WriteLine("Decimal: {0}", decVal);Use the ToString() method for the values you get as a binary number for the decimal value −while (decVal >= 1) { val = decVal / 2; a += (decVal % 2).ToString(); decVal = val; }Now set a new empty variable to display the binary number using a loop −string binValue = "";ExampleYou can try to run the following code to convert decimal to binary in C#.using System; using System.Collections.Generic; using System.Text; namespace Demo { class MyApplication { ...
Read MoreWhat is the difference between a class and an object in C#?
When you define a class, you define a blueprint for a data type.Objects are instances of a class. The methods and variables that constitute a class are called members of the class.To access the class members, you use the dot (.) operator after the object name. The dot operator links the name of an object with the name of a member for example, Box Box1 = new Box();Above you can see Box1 is our object. We will use it to access the members −Box1.height = 7.0;You can also use it to call member functions −Box1.getVolume();The following is an example showing ...
Read MoreDelete a file in C#
Use File.Delete method to delete a file.Firstly, set the path of the file you want to delete.String myPath = @"C:\New\amit.txt";Now, use the File.Delete method to delete the file.File.Delete(myPath);The following is the complete code −Exampleusing System; using System.IO; public class Program { public static void Main() { String myPath = @"C:\New\amit.txt"; Console.WriteLine("Deleting File"); File.Delete(myPath); } }OutputDeleting File
Read MoreRepresent Int64 as a Hexadecimal String in C#
To represent Int64 as a Binary string in C#, use the ToString() method and set the base as the ToString() method’s second parameter i.e.16 for Hexadecimal.Int64 represents a 64-bit signed integer.Firstly, set an Int64 variable.long val = 947645;Now, convert it to a hex string by including 16 as the second parameter.Convert.ToString(val, 16)Exampleusing System; class Demo { static void Main() { long val = 947645; Console.WriteLine("Long: "+val); Console.Write("Hex String: "+Convert.ToString(val, 16)); } }OutputLong: 947645 Hex String: e75bd
Read MoreSort the words in lexicographical order in C#
Firstly, set a string array −string[] arr = new string[] { "Indian", "Moroccon", "American", };To sort the words in lexicographical order −var sort = from a in arr orderby a select a;Exampleusing System; using System.Linq; class Program { static void Main() { string[] arr = new string[] { "Indian", "Moroccon", "American", }; var sort = from a in arr orderby a select a; foreach(string res in sort) { Console.WriteLine(res); } } }outputAmerican Indian Moroccon
Read MoreHow to find a matching substring using regular expression in C#?
Our string is − string str = " My make "; Use the following regular expression to find the substring “make” @"\bmake\b" Here is the complete code − Example using System; using System.Text.RegularExpressions; namespace RegExApplication { public class Program { private static void showMatch(string text, string expr) { Console.WriteLine("The Expression: " + expr); MatchCollection mc = Regex.Matches(text, expr); ...
Read More