[Solved] Concatenation chars VS split method [closed]

If you need all the elements that are between the delimiters, then Split() is the way to go. If you only need, say, the second element, and you don’t want to allocate memory for the first and third elements, you can use IndexOf to find the delimiters then extract the string using SubString. More tips … Read more

[Solved] How to get the last day of each month?

If I’m understanding this correctly, what you’re essentially doing is taking the month, adding 1 to it so it is actually the next month. Then you subtract a day from it so it’s the last day of the previous month. It would just be better to give it the actual date instead of doing a … Read more

[Solved] How to set space between TextBox values into array

Try this: var numbers = textBox1.Text.Split(‘ ‘); List<int> lst = numbers.Select(item => int.Parse(item)).ToList(); It will be even better if you use method group like this: List<int> lst = numbers.Select(int.Parse).ToList(); Then you can get it’s values like this: lst[0] –> 1 lst[1] –> 32 and … 0 solved How to set space between TextBox values into … Read more

[Solved] Is HTML.Partial case sensitive? [closed]

No Html.partial() is not case sensitive. I tested it. For example : Let say Your partial view name is “_HeaDing.cshtml” and its place in the same folder. Then you call the partial view in different cases like below: 1. @Html.Partial(“_heading”)-All characters are in smaller case 2. @Html.Partial(“_HEADING”)- All characters are in Upper case In all … Read more

[Solved] Incorrect result in c code

How your code should look #include <stdio.h> #include <stdlib.h> #include <math.h> void myfunction(double x, int y[2], int *d); int main(int argc, char **argv) { int a[2]; int *c = malloc(sizeof(int)); double b=10.0; *c = 5; a[0]=1; a[1]=2; printf(“before call %f %d %d %d\n”,b,a[0],a[1],*c); myfunction(b,a,c); printf(“after call %f %d %d %d\n”,b,a[0],a[1],*c); } void myfunction(double x, int … Read more

[Solved] can’t extract data from a structure array c++ [closed]

This should look a bit more like a code intended for humans to read 🙂 #include<iostream> #include<string> using namespace std; int ncr; int me,n=0,u,y,l; char opt1,opt2,opt3,opt4; struct student { string Name; int DoB; int Age; string Address; string Course[5]; char grade[5]; }; void add(); void remove(); void update(); void search(); int main() { int opt; … Read more

[Solved] Can you downgrade from VS 2019 to VS 2017

You don’t have to downgrade. Visual Studio 2019 and 2017 run side by side. Installing Visual Studio 2019 installs a new application in a different path. It doesn’t upgrade VS 2017, so there’s no reason to downgrade. I’m using VS 2017 and VS 2019 on the same machine for about 6 months now without issues. … Read more

[Solved] how to create a #define DEBUG in c

Use #define DEBUG when debugging and use //#define DEBUG when not… Or you can check DEBUG == 1, like #if defined(DEBUG) && (DEBUG == 1) printHex(“Data received\r\n”, recBuff, sizeof(recBuff)); //print out received hex data #endif Hope it helps… 1 solved how to create a #define DEBUG in c