Tag: r

60 votes
18 answers
839 views
"Items collection must be empty before using ItemsSource."

I'm trying to get images to display in a WPF ListView styled like a WrapPanel as described in this old AT

avatar
Lorenzo
0 1 0 9
asked 07 September, 2021
55 votes
6 answers
382 views
Is there a VB.NET equivalent for C#'s '??' operator?

Is there a VB.NET equivalent for C#'s ?? operator?

avatar
Winford
0 1 0 9
asked 07 September, 2021
61 votes
15 answers
2K views
Setting Objects to Null/Nothing after use in .NET

Should you set all the objects to null (Nothing in VB.NET) once you have finished with them? I understand th

avatar
Thurman
0 1 0 9
asked 07 September, 2021
54 votes
15 answers
381 views
Best way in asp.net to force https for an entire site?

About 6 months ago I rolled out a site where every request needed to be over https. The only way at the time

avatar
Forrest
0 1 0 9
asked 07 September, 2021
68 votes
10 answers
1.3K views
Is it possible to write to the console in colour in .NET?

Writing a small command line tool, it would be nice to output in different colours. Is this possible?

avatar
Scot
0 1 0 9
asked 07 September, 2021
56 votes
11 answers
824 views
What is the difference between And and AndAlso in VB.NET?

In VB.NET, what is the difference between And and AndAlso? Which should I use?

avatar
Brianne
0 1 0 9
asked 07 September, 2021
58 votes
4 answers
1.5K views
Is there a conditional ternary operator in VB.NET?

In Perl (and other languages) a conditional ternary operator can be expressed like this: my $foo = $bar == $b

avatar
Lynette
0 1 0 9
asked 07 September, 2021
59 votes
12 answers
1.9K views
How do you get a string from a MemoryStream?

If I am given a MemoryStream that I know has been populated with a String, how do I get a String back out?

avatar
Margo
0 1 0 9
asked 07 September, 2021
62 votes
17 answers
2.7K views
Converting string to byte array in C#

I'm converting something from VB into C#. Having a problem with the syntax of this statement: if ((searc

avatar
Freida
0 1 0 9
asked 07 September, 2021
53 votes
25 answers
1.1K views
How can I change image tintColor in iOS and WatchKit

I have an UIImageView called "theImageView", with UIImage in a single color (transparent background) just like

avatar
Don
0 1 0 9
asked 07 September, 2021
64 votes
14 answers
337 views
How do I concatenate or merge arrays in Swift?

If there are two arrays created in swift like this: var a:[CGFloat] = [1, 2, 3] var b:[CGFloat] = [4, 5, 6]

avatar
Benton
0 1 0 9
asked 07 September, 2021
60 votes
30 answers
2.8K views
Close iOS Keyboard by touching anywhere using Swift

I have been looking all over for this but I can't seem to find it. I know how to dismiss the keyboard us

avatar
Denese
0 1 0 9
asked 07 September, 2021
64 votes
12 answers
1.8K views
What does "Fatal error: Unexpectedly found nil while unwrapping an Optional value" mean?

My Swift program is crashing with EXC_BAD_INSTRUCTION and one of the following similar errors. What does this

avatar
Alba
0 1 0 9
asked 07 September, 2021
71 votes
9 answers
2K views
Static vs class functions/variables in Swift classes?

The following code compiles in Swift 1.2: class myClass { static func myMethod1() { } class func

avatar
Stacia
0 1 0 9
asked 07 September, 2021
58 votes
30 answers
1.6K views
Get nth character of a string in Swift programming language

How can I get the nth character of a string? I tried bracket([]) accessor with no luck. var string = "Hello,

avatar
Corrin
0 1 0 9
asked 07 September, 2021
54 votes
12 answers
1.2K views
How do I write dispatch_after GCD in Swift 3, 4, and 5?

In Swift 2, I was able to use dispatch_after to delay an action using grand central dispatch: var dispatchTim

avatar
Benton
0 1 0 9
asked 07 September, 2021
51 votes
30 answers
2.3K views
Loading/Downloading image from URL on Swift

I'd like to load an image from a URL in my application, so I first tried with Objective-C and it worked,

avatar
Lorenzo
0 1 0 9
asked 07 September, 2021
54 votes
25 answers
2.9K views
How does one generate a random number in Apple's Swift language?

I realize the Swift book provided an implementation of a random number generator. Is the best practice to cop

avatar
Adolfo
0 1 0 9
asked 07 September, 2021
58 votes
30 answers
1.6K views
How to hide UINavigationBar 1px bottom line

I have an app that sometimes needs its navigation bar to blend in with the content. Does anyone know how to

avatar
Corey
0 1 0 9
asked 07 September, 2021