What he did here by C# | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What he did here by C#

string connectionString = GetConnectionString(); ConnectToData(connectionString);

31st May 2017, 10:59 PM
ALAMOUDI, WAEL MAKKI S
ALAMOUDI, WAEL MAKKI S - avatar
3 Answers
+ 3
This is what is happening based on the information you have given us: A string called connectionString is being set the value of a function that returns a string, called getConnectionString. We then call the function ConnectToData and pass the string we had (connectionString) as it's arguments. Those functions could be anything, including nothing. If this is not what you were looking for as an answer, please think about whether or not you have given enough information for the reader to be able to answer your question. I also see no use in the string, you'd might as well just write: connectToData(getConnectionString());
31st May 2017, 11:05 PM
Rrestoring faith
Rrestoring faith - avatar
+ 3
There is no function written in what you wrote, but you certainlly call one from somewhere. That's what functionName(); means. Your just calling that function. Idk what it does, it's not in the code you gave us.
31st May 2017, 11:16 PM
Rrestoring faith
Rrestoring faith - avatar
0
where is the function here
31st May 2017, 11:14 PM
ALAMOUDI, WAEL MAKKI S
ALAMOUDI, WAEL MAKKI S - avatar